forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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 rust-lang#91539 - matthiaskrgr:rollup-rnl10yb, r=matthi…
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#89642 (environ on macos uses directly libc which has the correct signature.) - rust-lang#90022 (Explain why `Self` is invalid in generic parameters) - rust-lang#90023 (Postpone the evaluation of constant expressions that depend on inference variables) - rust-lang#91215 (Implement VecDeque::retain_mut) - rust-lang#91355 (std: Stabilize the `thread_local_const_init` feature) - rust-lang#91528 (LLVM support .insn directive) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
27 changed files
with
396 additions
and
88 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
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
Submodule llvm-project
updated
8 files
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#![crate_type = "lib"] | ||
#![feature(thread_local_const_init)] | ||
|
||
use std::cell::Cell; | ||
|
||
|
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
33 changes: 33 additions & 0 deletions
33
src/test/ui/const-generics/generic_const_exprs/const_eval_resolve_canonical.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,33 @@ | ||
error[E0282]: type annotations needed | ||
--> $DIR/const_eval_resolve_canonical.rs:26:9 | ||
| | ||
LL | let mut _q = Default::default(); | ||
| ^^^^^^ consider giving `_q` a type | ||
|
||
error[E0283]: type annotations needed | ||
--> $DIR/const_eval_resolve_canonical.rs:29:10 | ||
| | ||
LL | _q = foo::<_, 2>(_q); | ||
| ^^^^^^^^^^^ cannot infer type | ||
| | ||
note: multiple `impl`s satisfying `(): Foo<{ N + 1 }>` found | ||
--> $DIR/const_eval_resolve_canonical.rs:8:1 | ||
| | ||
LL | impl Foo<0> for () { | ||
| ^^^^^^^^^^^^^^^^^^ | ||
... | ||
LL | impl Foo<3> for () { | ||
| ^^^^^^^^^^^^^^^^^^ | ||
note: required by a bound in `foo` | ||
--> $DIR/const_eval_resolve_canonical.rs:18:9 | ||
| | ||
LL | fn foo<T, const N: usize>(_: T) -> <() as Foo<{ N + 1 }>>::Assoc | ||
| --- required by a bound in this | ||
LL | where | ||
LL | (): Foo<{ N + 1 }>, | ||
| ^^^^^^^^^^^^^^ required by this bound in `foo` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0282, E0283. | ||
For more information about an error, try `rustc --explain E0282`. |
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,23 @@ | ||
#![allow(incomplete_features)] | ||
#![feature(generic_const_exprs)] | ||
|
||
trait Foo { | ||
const N: usize; | ||
} | ||
|
||
impl Foo for u8 { | ||
const N: usize = 1; | ||
} | ||
|
||
fn foo<T: Foo>(_: [u8; T::N]) -> T { | ||
todo!() | ||
} | ||
|
||
pub fn bar() { | ||
let _: u8 = foo([0; 1]); | ||
|
||
let _ = foo([0; 1]); | ||
//~^ ERROR type annotations needed | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.