Skip to content

Commit

Permalink
Rollup merge of #96603 - Alexendoo:const-generics-tests, r=Mark-Simul…
Browse files Browse the repository at this point in the history
…acrum

Enable full revision in const generics ui tests

The ICEs no longer occur since #95776 so the revisions can be reenabled

Also adds some regression tests for issues that no longer ICE because of it

closes #77357
closes #78180
closes #83993
  • Loading branch information
JohnTitor authored May 5, 2022
2 parents 4c60a0e + 0571157 commit 1318d94
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 71 deletions.
162 changes: 162 additions & 0 deletions src/test/ui/const-generics/const-arg-in-const-arg.full.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
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: 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: 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: unconstrained generic constant
--> $DIR/const-arg-in-const-arg.rs:13:12
|
LL | let _: [u8; foo::<T>()];
| ^^^^^^^^^^^^^^^^
|
= help: try adding a `where` bound using this expression: `where [(); foo::<T>()]:`

error: unconstrained generic constant
--> $DIR/const-arg-in-const-arg.rs:15:12
|
LL | let _: [u8; bar::<N>()];
| ^^^^^^^^^^^^^^^^
|
= help: try adding a `where` bound using this expression: `where [(); bar::<N>()]:`

error: unconstrained generic constant
--> $DIR/const-arg-in-const-arg.rs:36:12
|
LL | let _: Foo<{ foo::<T>() }>;
| ^^^^^^^^^^^^^^^^^^^
|
= help: try adding a `where` bound using this expression: `where [(); { foo::<T>() }]:`

error: unconstrained generic constant
--> $DIR/const-arg-in-const-arg.rs:38:12
|
LL | let _: Foo<{ bar::<N>() }>;
| ^^^^^^^^^^^^^^^^^^^
|
= help: try adding a `where` bound using this expression: `where [(); { bar::<N>() }]:`

error: unconstrained generic constant
--> $DIR/const-arg-in-const-arg.rs:25:17
|
LL | let _ = [0; foo::<T>()];
| ^^^^^^^^^^
|
= help: try adding a `where` bound using this expression: `where [(); foo::<T>()]:`

error: unconstrained generic constant
--> $DIR/const-arg-in-const-arg.rs:27:17
|
LL | let _ = [0; bar::<N>()];
| ^^^^^^^^^^
|
= help: try adding a `where` bound using this expression: `where [(); bar::<N>()]:`

error: unconstrained generic constant
--> $DIR/const-arg-in-const-arg.rs:47:19
|
LL | let _ = Foo::<{ foo::<T>() }>;
| ^^^^^^^^^^^^^^
|
= help: try adding a `where` bound using this expression: `where [(); { foo::<T>() }]:`

error: unconstrained generic constant
--> $DIR/const-arg-in-const-arg.rs:49:19
|
LL | let _ = Foo::<{ bar::<N>() }>;
| ^^^^^^^^^^^^^^
|
= help: try adding a `where` bound using this expression: `where [(); { 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 16 previous errors

Loading

0 comments on commit 1318d94

Please sign in to comment.