mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
360 lines
13 KiB
Plaintext
360 lines
13 KiB
Plaintext
error: generic parameters may not be used in const operations
|
|
--> $DIR/const-arg-in-const-arg.rs:13:23
|
|
|
|
|
LL | let _: [u8; foo::<T>()];
|
|
| ^ cannot perform const operation using `T`
|
|
|
|
|
= note: type parameters may not be used in const expressions
|
|
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
|
|
|
|
error: generic parameters may not be used in const operations
|
|
--> $DIR/const-arg-in-const-arg.rs:15:23
|
|
|
|
|
LL | let _: [u8; bar::<N>()];
|
|
| ^ cannot perform const operation using `N`
|
|
|
|
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
|
|
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:18:23
|
|
|
|
|
LL | let _: [u8; faz::<'a>(&())];
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:20:23
|
|
|
|
|
LL | let _: [u8; baz::<'a>(&())];
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:21:23
|
|
|
|
|
LL | let _: [u8; faz::<'b>(&())];
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:23:23
|
|
|
|
|
LL | let _: [u8; baz::<'b>(&())];
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error: generic parameters may not be used in const operations
|
|
--> $DIR/const-arg-in-const-arg.rs:27:23
|
|
|
|
|
LL | let _ = [0; bar::<N>()];
|
|
| ^ cannot perform const operation using `N`
|
|
|
|
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
|
|
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:30:23
|
|
|
|
|
LL | let _ = [0; faz::<'a>(&())];
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:32:23
|
|
|
|
|
LL | let _ = [0; baz::<'a>(&())];
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:33:23
|
|
|
|
|
LL | let _ = [0; faz::<'b>(&())];
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:35:23
|
|
|
|
|
LL | let _ = [0; baz::<'b>(&())];
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error: generic parameters may not be used in const operations
|
|
--> $DIR/const-arg-in-const-arg.rs:36:24
|
|
|
|
|
LL | let _: Foo<{ foo::<T>() }>;
|
|
| ^ cannot perform const operation using `T`
|
|
|
|
|
= note: type parameters may not be used in const expressions
|
|
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
|
|
|
|
error: generic parameters may not be used in const operations
|
|
--> $DIR/const-arg-in-const-arg.rs:38:24
|
|
|
|
|
LL | let _: Foo<{ bar::<N>() }>;
|
|
| ^ cannot perform const operation using `N`
|
|
|
|
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
|
|
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:41:24
|
|
|
|
|
LL | let _: Foo<{ faz::<'a>(&()) }>;
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:43:24
|
|
|
|
|
LL | let _: Foo<{ baz::<'a>(&()) }>;
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:44:24
|
|
|
|
|
LL | let _: Foo<{ faz::<'b>(&()) }>;
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:46:24
|
|
|
|
|
LL | let _: Foo<{ baz::<'b>(&()) }>;
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error: generic parameters may not be used in const operations
|
|
--> $DIR/const-arg-in-const-arg.rs:47:27
|
|
|
|
|
LL | let _ = Foo::<{ foo::<T>() }>;
|
|
| ^ cannot perform const operation using `T`
|
|
|
|
|
= note: type parameters may not be used in const expressions
|
|
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
|
|
|
|
error: generic parameters may not be used in const operations
|
|
--> $DIR/const-arg-in-const-arg.rs:49:27
|
|
|
|
|
LL | let _ = Foo::<{ bar::<N>() }>;
|
|
| ^ cannot perform const operation using `N`
|
|
|
|
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
|
|
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:52:27
|
|
|
|
|
LL | let _ = Foo::<{ faz::<'a>(&()) }>;
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:54:27
|
|
|
|
|
LL | let _ = Foo::<{ baz::<'a>(&()) }>;
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:55:27
|
|
|
|
|
LL | let _ = Foo::<{ faz::<'b>(&()) }>;
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0658]: a non-static lifetime is not allowed in a `const`
|
|
--> $DIR/const-arg-in-const-arg.rs:57:27
|
|
|
|
|
LL | let _ = Foo::<{ baz::<'b>(&()) }>;
|
|
| ^^
|
|
|
|
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
|
|
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
|
|
|
|
error[E0747]: unresolved item provided when a constant was expected
|
|
--> $DIR/const-arg-in-const-arg.rs:15:23
|
|
|
|
|
LL | let _: [u8; bar::<N>()];
|
|
| ^
|
|
|
|
|
help: if this generic argument was intended as a const parameter, surround it with braces
|
|
|
|
|
LL | let _: [u8; bar::<{ N }>()];
|
|
| + +
|
|
|
|
error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
|
--> $DIR/const-arg-in-const-arg.rs:18:23
|
|
|
|
|
LL | let _: [u8; faz::<'a>(&())];
|
|
| ^^
|
|
|
|
|
note: the late bound lifetime parameter is introduced here
|
|
--> $DIR/const-arg-in-const-arg.rs:8:14
|
|
|
|
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
|
|
| ^^
|
|
|
|
error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
|
--> $DIR/const-arg-in-const-arg.rs:21:23
|
|
|
|
|
LL | let _: [u8; faz::<'b>(&())];
|
|
| ^^
|
|
|
|
|
note: the late bound lifetime parameter is introduced here
|
|
--> $DIR/const-arg-in-const-arg.rs:8:14
|
|
|
|
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
|
|
| ^^
|
|
|
|
error[E0747]: unresolved item provided when a constant was expected
|
|
--> $DIR/const-arg-in-const-arg.rs:38:24
|
|
|
|
|
LL | let _: Foo<{ bar::<N>() }>;
|
|
| ^
|
|
|
|
|
help: if this generic argument was intended as a const parameter, surround it with braces
|
|
|
|
|
LL | let _: Foo<{ bar::<{ N }>() }>;
|
|
| + +
|
|
|
|
error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
|
--> $DIR/const-arg-in-const-arg.rs:41:24
|
|
|
|
|
LL | let _: Foo<{ faz::<'a>(&()) }>;
|
|
| ^^
|
|
|
|
|
note: the late bound lifetime parameter is introduced here
|
|
--> $DIR/const-arg-in-const-arg.rs:8:14
|
|
|
|
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
|
|
| ^^
|
|
|
|
error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
|
--> $DIR/const-arg-in-const-arg.rs:44:24
|
|
|
|
|
LL | let _: Foo<{ faz::<'b>(&()) }>;
|
|
| ^^
|
|
|
|
|
note: the late bound lifetime parameter is introduced here
|
|
--> $DIR/const-arg-in-const-arg.rs:8:14
|
|
|
|
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
|
|
| ^^
|
|
|
|
error: constant expression depends on a generic parameter
|
|
--> $DIR/const-arg-in-const-arg.rs:25:17
|
|
|
|
|
LL | let _ = [0; foo::<T>()];
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: this may fail depending on what value the parameter takes
|
|
|
|
error[E0747]: unresolved item provided when a constant was expected
|
|
--> $DIR/const-arg-in-const-arg.rs:27:23
|
|
|
|
|
LL | let _ = [0; bar::<N>()];
|
|
| ^
|
|
|
|
|
help: if this generic argument was intended as a const parameter, surround it with braces
|
|
|
|
|
LL | let _ = [0; bar::<{ N }>()];
|
|
| + +
|
|
|
|
error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
|
--> $DIR/const-arg-in-const-arg.rs:30:23
|
|
|
|
|
LL | let _ = [0; faz::<'a>(&())];
|
|
| ^^
|
|
|
|
|
note: the late bound lifetime parameter is introduced here
|
|
--> $DIR/const-arg-in-const-arg.rs:8:14
|
|
|
|
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
|
|
| ^^
|
|
|
|
error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
|
--> $DIR/const-arg-in-const-arg.rs:33:23
|
|
|
|
|
LL | let _ = [0; faz::<'b>(&())];
|
|
| ^^
|
|
|
|
|
note: the late bound lifetime parameter is introduced here
|
|
--> $DIR/const-arg-in-const-arg.rs:8:14
|
|
|
|
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
|
|
| ^^
|
|
|
|
error[E0747]: unresolved item provided when a constant was expected
|
|
--> $DIR/const-arg-in-const-arg.rs:49:27
|
|
|
|
|
LL | let _ = Foo::<{ bar::<N>() }>;
|
|
| ^
|
|
|
|
|
help: if this generic argument was intended as a const parameter, surround it with braces
|
|
|
|
|
LL | let _ = Foo::<{ bar::<{ N }>() }>;
|
|
| + +
|
|
|
|
error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
|
--> $DIR/const-arg-in-const-arg.rs:52:27
|
|
|
|
|
LL | let _ = Foo::<{ faz::<'a>(&()) }>;
|
|
| ^^
|
|
|
|
|
note: the late bound lifetime parameter is introduced here
|
|
--> $DIR/const-arg-in-const-arg.rs:8:14
|
|
|
|
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
|
|
| ^^
|
|
|
|
error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
|
--> $DIR/const-arg-in-const-arg.rs:55:27
|
|
|
|
|
LL | let _ = Foo::<{ faz::<'b>(&()) }>;
|
|
| ^^
|
|
|
|
|
note: the late bound lifetime parameter is introduced here
|
|
--> $DIR/const-arg-in-const-arg.rs:8:14
|
|
|
|
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
|
|
| ^^
|
|
|
|
error: aborting due to 36 previous errors
|
|
|
|
Some errors have detailed explanations: E0658, E0747.
|
|
For more information about an error, try `rustc --explain E0658`.
|