rust/tests/ui/const-generics/const-arg-in-const-arg.min.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

360 lines
14 KiB
Plaintext
Raw Normal View History

2020-11-10 03:21:11 -06:00
error: generic parameters may not be used in const operations
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:15:23
2020-11-10 03:21:11 -06:00
|
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
2020-11-10 03:21:11 -06:00
error: generic parameters may not be used in const operations
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:16:23
2020-11-10 03:21:11 -06:00
|
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
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:18:23
2020-11-10 03:21:11 -06:00
|
LL | let _: [u8; faz::<'a>(&())];
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'a`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:20:23
2020-11-10 03:21:11 -06:00
|
LL | let _: [u8; baz::<'a>(&())];
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'a`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:21:23
2020-11-10 03:21:11 -06:00
|
LL | let _: [u8; faz::<'b>(&())];
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'b`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:23:23
2020-11-10 03:21:11 -06:00
|
LL | let _: [u8; baz::<'b>(&())];
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'b`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2022-03-31 13:11:22 -05:00
error: generic parameters may not be used in const operations
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:26:23
2022-03-31 13:11:22 -05:00
|
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
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:28:23
2020-11-10 03:21:11 -06:00
|
LL | let _ = [0; faz::<'a>(&())];
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'a`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:30:23
2020-11-10 03:21:11 -06:00
|
LL | let _ = [0; baz::<'a>(&())];
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'a`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:31:23
2020-11-10 03:21:11 -06:00
|
LL | let _ = [0; faz::<'b>(&())];
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'b`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:33:23
2020-11-10 03:21:11 -06:00
|
LL | let _ = [0; baz::<'b>(&())];
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'b`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2022-03-31 13:11:22 -05:00
error: generic parameters may not be used in const operations
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:34:24
2022-03-31 13:11:22 -05:00
|
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
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:35:24
2022-03-31 13:11:22 -05:00
|
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
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:37:24
2020-11-10 03:21:11 -06:00
|
LL | let _: Foo<{ faz::<'a>(&()) }>;
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'a`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:39:24
2020-11-10 03:21:11 -06:00
|
LL | let _: Foo<{ baz::<'a>(&()) }>;
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'a`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:40:24
2020-11-10 03:21:11 -06:00
|
LL | let _: Foo<{ faz::<'b>(&()) }>;
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'b`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:42:24
2020-11-10 03:21:11 -06:00
|
LL | let _: Foo<{ baz::<'b>(&()) }>;
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'b`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2022-03-31 13:11:22 -05:00
error: generic parameters may not be used in const operations
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:43:27
2022-03-31 13:11:22 -05:00
|
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
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:44:27
2022-03-31 13:11:22 -05:00
|
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
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:46:27
2020-11-10 03:21:11 -06:00
|
LL | let _ = Foo::<{ faz::<'a>(&()) }>;
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'a`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:48:27
2020-11-10 03:21:11 -06:00
|
LL | let _ = Foo::<{ baz::<'a>(&()) }>;
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'a`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:49:27
2020-11-10 03:21:11 -06:00
|
LL | let _ = Foo::<{ faz::<'b>(&()) }>;
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'b`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
--> $DIR/const-arg-in-const-arg.rs:51:27
2020-11-10 03:21:11 -06:00
|
LL | let _ = Foo::<{ baz::<'b>(&()) }>;
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'b`
2020-11-10 03:21:11 -06:00
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2020-11-10 03:21:11 -06:00
2022-03-31 13:11:22 -05:00
error[E0747]: unresolved item provided when a constant was expected
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:16:23
2022-03-31 13:11:22 -05:00
|
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[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
--> $DIR/const-arg-in-const-arg.rs:18:23
2022-03-31 13:11:22 -05:00
|
LL | let _: [u8; faz::<'a>(&())];
| ^^
|
note: the late bound lifetime parameter is introduced here
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:10:14
2022-03-31 13:11:22 -05:00
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
| ^^
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
--> $DIR/const-arg-in-const-arg.rs:21:23
2022-03-31 13:11:22 -05:00
|
LL | let _: [u8; faz::<'b>(&())];
| ^^
|
note: the late bound lifetime parameter is introduced here
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:10:14
2022-03-31 13:11:22 -05:00
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
| ^^
error[E0747]: unresolved item provided when a constant was expected
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:35:24
2022-03-31 13:11:22 -05:00
|
LL | let _: Foo<{ bar::<N>() }>;
| ^
2022-03-31 13:11:22 -05:00
|
help: if this generic argument was intended as a const parameter, surround it with braces
|
LL | let _: Foo<{ bar::<{ N }>() }>;
| + +
2022-03-31 13:11:22 -05:00
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:37:24
2022-03-31 13:11:22 -05:00
|
LL | let _: Foo<{ faz::<'a>(&()) }>;
| ^^
2022-03-31 13:11:22 -05:00
|
note: the late bound lifetime parameter is introduced here
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:10:14
2022-03-31 13:11:22 -05:00
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
| ^^
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:40:24
2022-03-31 13:11:22 -05:00
|
LL | let _: Foo<{ faz::<'b>(&()) }>;
| ^^
2022-03-31 13:11:22 -05:00
|
note: the late bound lifetime parameter is introduced here
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:10:14
2022-03-31 13:11:22 -05:00
|
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
2022-03-31 13:11:22 -05:00
error[E0747]: unresolved item provided when a constant was expected
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:26:23
2022-03-31 13:11:22 -05:00
|
LL | let _ = [0; bar::<N>()];
| ^
2022-03-31 13:11:22 -05:00
|
help: if this generic argument was intended as a const parameter, surround it with braces
|
LL | let _ = [0; bar::<{ N }>()];
| + +
2022-03-31 13:11:22 -05:00
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:28:23
2022-03-31 13:11:22 -05:00
|
LL | let _ = [0; faz::<'a>(&())];
| ^^
2022-03-31 13:11:22 -05:00
|
note: the late bound lifetime parameter is introduced here
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:10:14
2022-03-31 13:11:22 -05:00
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
| ^^
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:31:23
2022-03-31 13:11:22 -05:00
|
LL | let _ = [0; faz::<'b>(&())];
| ^^
2022-03-31 13:11:22 -05:00
|
note: the late bound lifetime parameter is introduced here
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:10:14
2022-03-31 13:11:22 -05:00
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
| ^^
error[E0747]: unresolved item provided when a constant was expected
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:44:27
2022-03-31 13:11:22 -05:00
|
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[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:46:27
2022-03-31 13:11:22 -05:00
|
LL | let _ = Foo::<{ faz::<'a>(&()) }>;
| ^^
|
note: the late bound lifetime parameter is introduced here
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:10:14
2022-03-31 13:11:22 -05:00
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
| ^^
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:49:27
2022-03-31 13:11:22 -05:00
|
LL | let _ = Foo::<{ faz::<'b>(&()) }>;
| ^^
|
note: the late bound lifetime parameter is introduced here
2023-05-05 15:42:51 -05:00
--> $DIR/const-arg-in-const-arg.rs:10:14
2022-03-31 13:11:22 -05:00
|
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
| ^^
error: aborting due to 36 previous errors
2020-11-10 03:21:11 -06:00
2023-05-05 15:42:51 -05:00
Some errors have detailed explanations: E0747, E0794.
For more information about an error, try `rustc --explain E0747`.