-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #60794 - Centril:rollup-vlguvns, r=Centril
Rollup of 5 pull requests Successful merges: - #60176 (Explain error when yielding a reference to a local variable) - #60201 (coretest: Downgrade deny to warn) - #60562 (Add #[doc(hidden)] attribute on compiler generated module.) - #60710 (Use `delay_span_bug` for error cases when checking `AnonConst` parent) - #60770 (add impl_trait_in_bindings to INCOMPLETE_FEATURES) Failed merges: r? @ghost
- Loading branch information
Showing
21 changed files
with
240 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash | ||
--> $DIR/impl-trait-in-bindings.rs:1:12 | ||
| | ||
LL | #![feature(impl_trait_in_bindings)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
|
11 changes: 11 additions & 0 deletions
11
src/test/ui/const-generics/cannot-infer-type-for-const-param.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![feature(const_generics)] | ||
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash | ||
|
||
// We should probably be able to infer the types here. However, this test is checking that we don't | ||
// get an ICE in this case. It may be modified later to not be an error. | ||
|
||
struct Foo<const NUM_BYTES: usize>(pub [u8; NUM_BYTES]); | ||
|
||
fn main() { | ||
let _ = Foo::<3>([1, 2, 3]); //~ ERROR type annotations needed | ||
} |
15 changes: 15 additions & 0 deletions
15
src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
warning: the feature `const_generics` is incomplete and may cause the compiler to crash | ||
--> $DIR/cannot-infer-type-for-const-param.rs:1:12 | ||
| | ||
LL | #![feature(const_generics)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error[E0282]: type annotations needed | ||
--> $DIR/cannot-infer-type-for-const-param.rs:10:19 | ||
| | ||
LL | let _ = Foo::<3>([1, 2, 3]); | ||
| ^ cannot infer type for `{integer}` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0282`. |
9 changes: 9 additions & 0 deletions
9
src/test/ui/const-generics/invalid-const-arg-for-type-param.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use std::convert::TryInto; | ||
|
||
struct S; | ||
|
||
fn main() { | ||
let _: u32 = 5i32.try_into::<32>().unwrap(); //~ ERROR wrong number of const arguments | ||
S.f::<0>(); //~ ERROR no method named `f` | ||
S::<0>; //~ ERROR wrong number of const arguments | ||
} |
Oops, something went wrong.