Merge branch 'master' into issue-69276

This commit is contained in:
csmoe 2020-05-18 08:46:24 +08:00
commit 2f311b07c8
589 changed files with 7983 additions and 3099 deletions

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
fn is_123<const N: usize>(x: [u32; N]) -> bool {
match x {

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/match_arr_unknown_len.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0308]: mismatched types
--> $DIR/match_arr_unknown_len.rs:6:9
@ -13,7 +14,7 @@ LL | [1, 2] => true,
| ^^^^^^ expected `2usize`, found `N`
|
= note: expected array `[u32; 2]`
found array `[u32; _]`
found array `[u32; N]`
error: aborting due to previous error; 1 warning emitted

View file

@ -16,11 +16,13 @@ error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` is not an iterato
--> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20
|
LL | fn assume_case1<T: Case1>() {
| ^^^^^ - help: consider further restricting the associated type: `where <<T as Case1>::C as std::iter::Iterator>::Item: std::iter::Iterator`
| |
| `<<T as Case1>::C as std::iter::Iterator>::Item` is not an iterator
| ^^^^^ `<<T as Case1>::C as std::iter::Iterator>::Item` is not an iterator
|
= help: the trait `std::iter::Iterator` is not implemented for `<<T as Case1>::C as std::iter::Iterator>::Item`
help: consider further restricting the associated type
|
LL | fn assume_case1<T: Case1>() where <<T as Case1>::C as std::iter::Iterator>::Item: std::iter::Iterator {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be sent between threads safely
--> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20
@ -32,11 +34,13 @@ LL | Send + Iterator<Item:
| ---- required by this bound in `Case1`
...
LL | fn assume_case1<T: Case1>() {
| ^^^^^ - help: consider further restricting the associated type: `where <<T as Case1>::C as std::iter::Iterator>::Item: std::marker::Send`
| |
| `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be sent between threads safely
| ^^^^^ `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `<<T as Case1>::C as std::iter::Iterator>::Item`
help: consider further restricting the associated type
|
LL | fn assume_case1<T: Case1>() where <<T as Case1>::C as std::iter::Iterator>::Item: std::marker::Send {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be shared between threads safely
--> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20
@ -48,11 +52,13 @@ LL | > + Sync>;
| ---- required by this bound in `Case1`
...
LL | fn assume_case1<T: Case1>() {
| ^^^^^ - help: consider further restricting the associated type: `where <<T as Case1>::C as std::iter::Iterator>::Item: std::marker::Sync`
| |
| `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be shared between threads safely
| ^^^^^ `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `<<T as Case1>::C as std::iter::Iterator>::Item`
help: consider further restricting the associated type
|
LL | fn assume_case1<T: Case1>() where <<T as Case1>::C as std::iter::Iterator>::Item: std::marker::Sync {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `<_ as Lam<&'a u8>>::App` doesn't implement `std::fmt::Debug`
--> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20

View file

@ -2,7 +2,7 @@
#![feature(associated_type_bounds)]
#![feature(type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)] //~ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash [incomplete_features]
#![feature(impl_trait_in_bindings)] //~ WARN the feature `impl_trait_in_bindings` is incomplete
#![feature(untagged_unions)]
use std::iter;

View file

@ -1,10 +1,11 @@
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/duplicate.rs:5:12
|
LL | #![feature(impl_trait_in_bindings)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
--> $DIR/duplicate.rs:10:36

View file

@ -1,10 +1,11 @@
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/dyn-lcsit.rs:4:12
|
LL | #![feature(impl_trait_in_bindings)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
warning: 1 warning emitted

View file

@ -1,10 +1,11 @@
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/lcsit.rs:4:12
|
LL | #![feature(impl_trait_in_bindings)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
warning: 1 warning emitted

View file

@ -14,7 +14,7 @@ pub trait GetToInt
}
fn foo<G>(g: G) -> isize
where G : GetToInt, <G as GetToInt>::R: ToInt
where G : GetToInt, <G as GetToInt>::R: ToInt
{
ToInt::to_int(&g.get()) //~ ERROR E0277
}

View file

@ -4,11 +4,13 @@ error[E0277]: the trait bound `<G as GetToInt>::R: ToInt` is not satisfied
LL | fn to_int(&self) -> isize;
| -------------------------- required by `ToInt::to_int`
...
LL | where G : GetToInt
| - help: consider further restricting the associated type: `, <G as GetToInt>::R: ToInt`
LL | {
LL | ToInt::to_int(&g.get())
| ^^^^^^^^ the trait `ToInt` is not implemented for `<G as GetToInt>::R`
|
help: consider further restricting the associated type
|
LL | where G : GetToInt, <G as GetToInt>::R: ToInt
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -7,7 +7,7 @@ trait Get {
}
trait Other {
fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
//~^ ERROR the trait bound `Self: Get` is not satisfied
}

View file

@ -2,10 +2,12 @@ error[E0277]: the trait bound `Self: Get` is not satisfied
--> $DIR/associated-types-for-unimpl-trait.rs:10:5
|
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^
| | |
| | help: consider further restricting `Self`: `where Self: Get`
| the trait `Get` is not implemented for `Self`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
help: consider further restricting `Self`
|
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
| ^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -2,10 +2,12 @@ error[E0277]: the trait bound `Self: Get` is not satisfied
--> $DIR/associated-types-no-suitable-supertrait-2.rs:17:5
|
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^
| | |
| | help: consider further restricting `Self`: `where Self: Get`
| the trait `Get` is not implemented for `Self`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
help: consider further restricting `Self`
|
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
| ^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -2,10 +2,12 @@ error[E0277]: the trait bound `Self: Get` is not satisfied
--> $DIR/associated-types-no-suitable-supertrait.rs:17:5
|
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^
| | |
| | help: consider further restricting `Self`: `where Self: Get`
| the trait `Get` is not implemented for `Self`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
help: consider further restricting `Self`
|
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
| ^^^^^^^^^^^^^^^
error[E0277]: the trait bound `(T, U): Get` is not satisfied
--> $DIR/associated-types-no-suitable-supertrait.rs:22:5

View file

@ -7,7 +7,7 @@ trait Get {
}
trait Other {
fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get ;
fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get;
//~^ ERROR E0277
}

View file

@ -2,10 +2,12 @@ error[E0277]: the trait bound `Self: Get` is not satisfied
--> $DIR/associated-types-projection-to-unrelated-trait-in-method-without-default.rs:10:5
|
LL | fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| | |
| | help: consider further restricting `Self`: `where Self: Get`
| the trait `Get` is not implemented for `Self`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
help: consider further restricting `Self`
|
LL | fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get;
| ^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -6,7 +6,7 @@ trait Get {
fn get(&self) -> <Self as Get>::Value;
}
fn foo<T:Get>(t: T) where <T as Get>::Value: std::marker::Sized {
fn foo<T:Get>(t: T) where <T as Get>::Value: std::marker::Sized {
let x = t.get(); //~ ERROR the size for values of type
}

View file

@ -1,8 +1,6 @@
error[E0277]: the size for values of type `<T as Get>::Value` cannot be known at compilation time
--> $DIR/associated-types-unsized.rs:10:9
|
LL | fn foo<T:Get>(t: T) {
| - help: consider further restricting the associated type: `where <T as Get>::Value: std::marker::Sized`
LL | let x = t.get();
| ^ doesn't have a size known at compile-time
|
@ -10,6 +8,10 @@ LL | let x = t.get();
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
help: consider further restricting the associated type
|
LL | fn foo<T:Get>(t: T) where <T as Get>::Value: std::marker::Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -85,25 +85,29 @@ error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: std::clone::Clone` is not
--> $DIR/defaults-suitability.rs:72:15
|
LL | trait Foo2<T> {
| -------------- help: consider further restricting the associated type: `where <Self as Foo2<T>>::Baz: std::clone::Clone`
| |
| required by `Foo2`
| ------------- required by `Foo2`
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^ the trait `std::clone::Clone` is not implemented for `<Self as Foo2<T>>::Baz`
|
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<<Self as Foo2<T>>::Baz>`
help: consider further restricting the associated type
|
LL | trait Foo2<T> where <Self as Foo2<T>>::Baz: std::clone::Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: std::clone::Clone` is not satisfied
--> $DIR/defaults-suitability.rs:81:15
|
LL | trait Foo25<T: Clone> {
| ---------------------- help: consider further restricting the associated type: `where <Self as Foo25<T>>::Baz: std::clone::Clone`
| |
| required by `Foo25`
| --------------------- required by `Foo25`
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^ the trait `std::clone::Clone` is not implemented for `<Self as Foo25<T>>::Baz`
|
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<<Self as Foo25<T>>::Baz>`
help: consider further restricting the associated type
|
LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::Baz: std::clone::Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
--> $DIR/defaults-suitability.rs:90:16

View file

@ -6,6 +6,11 @@ LL | trait UncheckedCopy: Sized {
...
LL | type Output: Copy
| ^^^^ the trait `std::marker::Copy` is not implemented for `Self`
|
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + std::marker::Copy {
| ^^^^^^^^^^^^^^^^^^^
error[E0277]: cannot add-assign `&'static str` to `Self`
--> $DIR/defaults-unsound-62211-1.rs:25:7
@ -17,6 +22,10 @@ LL | + AddAssign<&'static str>
| ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str`
|
= help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `Self`
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + std::ops::AddAssign<&'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Self: std::ops::Deref` is not satisfied
--> $DIR/defaults-unsound-62211-1.rs:23:7
@ -26,6 +35,11 @@ LL | trait UncheckedCopy: Sized {
...
LL | + Deref<Target = str>
| ^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `Self`
|
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + std::ops::Deref {
| ^^^^^^^^^^^^^^^^^
error[E0277]: `Self` doesn't implement `std::fmt::Display`
--> $DIR/defaults-unsound-62211-1.rs:28:7
@ -38,6 +52,10 @@ LL | + Display = Self;
|
= help: the trait `std::fmt::Display` is not implemented for `Self`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + std::fmt::Display {
| ^^^^^^^^^^^^^^^^^^^
error[E0277]: `T` doesn't implement `std::fmt::Display`
--> $DIR/defaults-unsound-62211-1.rs:41:9

View file

@ -6,6 +6,11 @@ LL | trait UncheckedCopy: Sized {
...
LL | type Output: Copy
| ^^^^ the trait `std::marker::Copy` is not implemented for `Self`
|
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + std::marker::Copy {
| ^^^^^^^^^^^^^^^^^^^
error[E0277]: cannot add-assign `&'static str` to `Self`
--> $DIR/defaults-unsound-62211-2.rs:25:7
@ -17,6 +22,10 @@ LL | + AddAssign<&'static str>
| ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str`
|
= help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `Self`
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + std::ops::AddAssign<&'static str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Self: std::ops::Deref` is not satisfied
--> $DIR/defaults-unsound-62211-2.rs:23:7
@ -26,6 +35,11 @@ LL | trait UncheckedCopy: Sized {
...
LL | + Deref<Target = str>
| ^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `Self`
|
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + std::ops::Deref {
| ^^^^^^^^^^^^^^^^^
error[E0277]: `Self` doesn't implement `std::fmt::Display`
--> $DIR/defaults-unsound-62211-2.rs:28:7
@ -38,6 +52,10 @@ LL | + Display = Self;
|
= help: the trait `std::fmt::Display` is not implemented for `Self`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + std::fmt::Display {
| ^^^^^^^^^^^^^^^^^^^
error[E0277]: `T` doesn't implement `std::fmt::Display`
--> $DIR/defaults-unsound-62211-2.rs:41:9

View file

@ -8,6 +8,10 @@ LL | type This = Self;
|
= help: the trait `std::marker::Sized` is not implemented for `Self`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
help: consider further restricting `Self`
|
LL | trait MyTrait: std::marker::Sized {
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -0,0 +1,11 @@
use std::ops::{Add, Sub, Mul, Div};
trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> {}
//~^ ERROR the size for values of type `Self` cannot be known at compilation time
impl<T> ArithmeticOps for T where T: Add<Output=T> + Sub<Output=T> + Mul<Output=T> + Div<Output=T> {
// Nothing to implement, since T already supports the other traits.
// It has the functions it needs already
}
fn main() {}

View file

@ -0,0 +1,21 @@
error[E0277]: the size for values of type `Self` cannot be known at compilation time
--> $DIR/trait-with-supertraits-needing-sized-self.rs:3:22
|
LL | trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> {}
| ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/libcore/ops/arith.rs:LL:COL
|
LL | pub trait Add<Rhs = Self> {
| --- required by this bound in `std::ops::Add`
|
= help: the trait `std::marker::Sized` is not implemented for `Self`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
help: consider further restricting `Self`
|
LL | trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + std::marker::Sized {}
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.

View file

@ -237,7 +237,10 @@ error[E0277]: the `?` operator can only be applied to values that implement `std
--> $DIR/incorrect-syntax-suggestions.rs:16:19
|
LL | let _ = await bar()?;
| ^^^^^^ the `?` operator cannot be applied to type `impl std::future::Future`
| ^^^^^^
| |
| the `?` operator cannot be applied to type `impl std::future::Future`
| help: consider using `.await` here: `bar().await?`
|
= help: the trait `std::ops::Try` is not implemented for `impl std::future::Future`
= note: required by `std::ops::Try::into_result`

View file

@ -0,0 +1,32 @@
// edition:2018
use core::future::Future;
use core::pin::Pin;
use core::task::{Context, Poll};
struct T;
impl Future for T {
type Output = Result<(), ()>;
fn poll(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Self::Output> {
Poll::Pending
}
}
async fn foo() -> Result<(), ()> {
Ok(())
}
async fn bar() -> Result<(), ()> {
foo()?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
Ok(())
}
async fn baz() -> Result<(), ()> {
let t = T;
t?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try`
Ok(())
}
fn main() {}

View file

@ -0,0 +1,27 @@
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
--> $DIR/issue-61076.rs:22:5
|
LL | foo()?;
| ^^^^^^
| |
| the `?` operator cannot be applied to type `impl std::future::Future`
| help: consider using `.await` here: `foo().await?`
|
= help: the trait `std::ops::Try` is not implemented for `impl std::future::Future`
= note: required by `std::ops::Try::into_result`
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
--> $DIR/issue-61076.rs:28:5
|
LL | t?;
| ^^
| |
| the `?` operator cannot be applied to type `T`
| help: consider using `.await` here: `t.await?`
|
= help: the trait `std::ops::Try` is not implemented for `T`
= note: required by `std::ops::Try::into_result`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.

View file

@ -6,4 +6,4 @@ LL | pub async fn new(_bar: &'a i32) -> Self {
error: aborting due to previous error
For more information about this error, try `rustc --explain E0754`.
For more information about this error, try `rustc --explain E0755`.

View file

@ -7,7 +7,8 @@ async fn an_async_block() -> u32 {
let x: Option<u32> = None;
x?; //~ ERROR the `?` operator
22
}.await
}
.await
}
async fn async_closure_containing_fn() -> u32 {

View file

@ -7,14 +7,14 @@ LL | | let x: Option<u32> = None;
LL | | x?;
| | ^^ cannot use the `?` operator in an async block that returns `{integer}`
LL | | 22
LL | | }.await
LL | | }
| |_____- this function should return `Result` or `Option` to accept `?`
|
= help: the trait `std::ops::Try` is not implemented for `{integer}`
= note: required by `std::ops::Try::from_error`
error[E0277]: the `?` operator can only be used in an async closure that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
--> $DIR/try-on-option-in-async.rs:16:9
--> $DIR/try-on-option-in-async.rs:17:9
|
LL | let async_closure = async || {
| __________________________________-
@ -29,7 +29,7 @@ LL | | };
= note: required by `std::ops::Try::from_error`
error[E0277]: the `?` operator can only be used in an async function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
--> $DIR/try-on-option-in-async.rs:25:5
--> $DIR/try-on-option-in-async.rs:26:5
|
LL | async fn an_async_function() -> u32 {
| _____________________________________-

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-param.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0158]: const parameters cannot be referenced in patterns
--> $DIR/const-param.rs:7:9

View file

@ -1,7 +1,7 @@
// check-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
trait Trait {}

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/apit-with-const-param.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
struct Bad<const N: usize, T> { //~ ERROR type parameters must be declared prior
arr: [u8; { N }],

View file

@ -4,13 +4,14 @@ error: type parameters must be declared prior to const parameters
LL | struct Bad<const N: usize, T> {
| -----------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const N: usize>`
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/argument_order.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error: aborting due to previous error; 1 warning emitted

View file

@ -29,7 +29,7 @@ LL | let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::boxed::Box<[i32]>>` is not implemented for `std::boxed::Box<[i32; 33]>`
|
= help: the following implementations were found:
<std::boxed::Box<[T; _]> as std::convert::TryFrom<std::boxed::Box<[T]>>>
<std::boxed::Box<[T; N]> as std::convert::TryFrom<std::boxed::Box<[T]>>>
error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::From<std::rc::Rc<[i32]>>` is not satisfied
--> $DIR/alloc-types-no-impls-length-33.rs:19:23
@ -53,7 +53,7 @@ LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
|
= help: the following implementations were found:
<std::rc::Rc<[T; _]> as std::convert::TryFrom<std::rc::Rc<[T]>>>
<std::rc::Rc<[T; N]> as std::convert::TryFrom<std::rc::Rc<[T]>>>
error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::From<std::sync::Arc<[i32]>>` is not satisfied
--> $DIR/alloc-types-no-impls-length-33.rs:26:23
@ -77,7 +77,7 @@ LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
|
= help: the following implementations were found:
<std::sync::Arc<[T; _]> as std::convert::TryFrom<std::sync::Arc<[T]>>>
<std::sync::Arc<[T; N]> as std::convert::TryFrom<std::sync::Arc<[T]>>>
error: aborting due to 7 previous errors

View file

@ -39,9 +39,9 @@ LL | for _ in &[0_usize; 33] {
| ^^^^^^^^^^^^^^ the trait `std::iter::IntoIterator` is not implemented for `&[usize; 33]`
|
= help: the following implementations were found:
<&'a [T; _] as std::iter::IntoIterator>
<&'a [T; N] as std::iter::IntoIterator>
<&'a [T] as std::iter::IntoIterator>
<&'a mut [T; _] as std::iter::IntoIterator>
<&'a mut [T; N] as std::iter::IntoIterator>
<&'a mut [T] as std::iter::IntoIterator>
= note: required by `std::iter::IntoIterator::into_iter`

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
#[allow(dead_code)]
struct ArithArrayLen<const N: usize>([u32; 0 + N]);

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/array-size-in-generic-struct-param.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error: constant expression depends on a generic parameter
--> $DIR/array-size-in-generic-struct-param.rs:5:38

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
#![allow(dead_code)]

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/array-wrapper-struct-ctor.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
pub trait Foo {
fn foo(&self);

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/broken-mir-1.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
use std::fmt::Debug;

View file

@ -1,19 +1,20 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/broken-mir-2.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> $DIR/broken-mir-2.rs:7:36
|
LL | struct S<T: Debug, const N: usize>([T; N]);
| ^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[T; _]`
| ^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[T; N]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[T; _]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[T; _]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[T; N]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[T; N]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
fn foo<const X: usize>() -> usize {
0

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/cannot-infer-const-args.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0282]: type annotations needed
--> $DIR/cannot-infer-const-args.rs:9:5

View file

@ -1,6 +1,6 @@
// check-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
// This test confirms that the types can be inferred correctly for this example with const
// generics. Previously this would ICE, and more recently error.

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/cannot-infer-type-for-const-param.rs:2:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -2,7 +2,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
struct A<const N: usize>; // ok

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/concrete-const-as-fn-arg.rs:4:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -3,7 +3,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
pub struct A<const N: u32>;

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/concrete-const-impl-method.rs:5:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
trait IsZeroTrait<const IS_ZERO: bool>{}

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/condition-in-trait-const-arg.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
fn const_u32_identity<const X: u32>() -> u32 {
X

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-arg-in-fn.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
type Array<T, const N: usize> = [T; N];

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-arg-type-arg-misordered.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0747]: constant provided when a type was expected
--> $DIR/const-arg-type-arg-misordered.rs:6:35

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
fn i32_identity<const X: i32>() -> i32 {
5

View file

@ -4,13 +4,14 @@ error: expected one of `,` or `>`, found `+`
LL | i32_identity::<1 + 2>();
| ^ expected one of `,` or `>`
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-expression-parameter.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error: aborting due to previous error; 1 warning emitted

View file

@ -1,6 +1,6 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
const fn const_u32_identity<const X: u32>() -> u32 {
X

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-fn-with-const-param.rs:2:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
struct Foo<T, const N: usize>([T; N]);

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-generic-array-wrapper.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
#[derive(Debug)]
struct S<const N: usize>;

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-generic-type_name.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -4,7 +4,7 @@
// lifetimes within const/static items.
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
struct A<const N: &u8>;
//~^ ERROR `&` without an explicit lifetime name cannot be used here

View file

@ -28,13 +28,14 @@ error[E0637]: `&` without an explicit lifetime name cannot be used here
LL | fn bar<const N: &u8>() {}
| ^ explicit lifetime name needed here
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-param-elided-lifetime.rs:6:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error: aborting due to 5 previous errors; 1 warning emitted

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
fn foo<const X: u32>() {
fn bar() -> u32 {

View file

@ -8,13 +8,14 @@ LL | fn bar() -> u32 {
LL | X
| ^ use of generic parameter from outer function
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-param-from-outer-fn.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error: aborting due to previous error; 1 warning emitted

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
trait Trait<const T: ()> {}

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-param-in-trait.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
// Currently, const parameters cannot depend on type parameters, because there is no way to
// enforce the structural-match property on an arbitrary type parameter. This restriction

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-param-type-depends-on-type-param.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0741]: `T` is not guaranteed to `#[derive(PartialEq, Eq)]`, so may not be used as the type of a const parameter
--> $DIR/const-param-type-depends-on-type-param.rs:9:34

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
#![deny(non_upper_case_globals)]

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-parameter-uppercase-lint.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error: const parameter `x` should have an upper case name
--> $DIR/const-parameter-uppercase-lint.rs:6:15

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
#![allow(dead_code, unused_variables)]

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-types.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
#[derive(Debug)]
struct X<const N: usize> {

View file

@ -1,19 +1,20 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/derive-debug-array-wrapper.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> $DIR/derive-debug-array-wrapper.rs:6:5
|
LL | a: [u32; N],
| ^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[u32; _]`
| ^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[u32; N]`
|
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[u32; _]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[u32; _]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `[u32; N]`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&[u32; N]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
struct Const<const V: [usize; 1]> {}

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/different_byref.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0308]: mismatched types
--> $DIR/different_byref.rs:8:9

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics, const_compare_raw_pointers)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
fn function() -> u32 {
17

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/fn-const-param-call.rs:3:12
|
LL | #![feature(const_generics, const_compare_raw_pointers)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,5 +1,5 @@
#![feature(const_generics, const_compare_raw_pointers)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
struct Checked<const F: fn(usize) -> bool>;

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/fn-const-param-infer.rs:1:12
|
LL | #![feature(const_generics, const_compare_raw_pointers)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0308]: mismatched types
--> $DIR/fn-const-param-infer.rs:16:31

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
use std::fmt::Display;

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/fn-taking-const-generic-array.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
#[derive(PartialEq, Eq)]
struct A;

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/forbid-non-structural_match-types.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0741]: `C` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter
--> $DIR/forbid-non-structural_match-types.rs:11:19

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
extern "C" {
fn foo<const X: usize>(); //~ ERROR foreign items may not have const parameters

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/foreign-item-const-parameter.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0044]: foreign items may not have const parameters
--> $DIR/foreign-item-const-parameter.rs:5:5

View file

@ -1,7 +1,7 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
struct S<const X: u32>;

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/impl-const-generic-struct.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
fn foo<const X: usize, const Y: usize>() -> usize {
0

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/incorrect-number-of-const-args.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0107]: wrong number of const arguments: expected 2, found 1
--> $DIR/incorrect-number-of-const-args.rs:9:5

View file

@ -2,7 +2,7 @@
//
// see issue #70529
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
struct A<const N: usize> {
arr: [u8; N],

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/infer_arg_from_pat.rs:4:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

View file

@ -2,7 +2,7 @@
//
// see issue #70529
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete
fn as_chunks<const N: usize>() -> [u8; N] {
loop {}

View file

@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/infer_arr_len_from_pat.rs:4:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
warning: 1 warning emitted

Some files were not shown because too many files have changed in this diff Show more