Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f74119a

Browse files
committed
Bless tests and handle tests/crashes
1 parent 7fa98d0 commit f74119a

35 files changed

+386
-285
lines changed

tests/crashes/122908.rs

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/crashes/125556.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/debuginfo/function-names.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
// Const generic parameter
3838
// gdb-command:info functions -q function_names::const_generic_fn.*
3939
// gdb-check:[...]static fn function_names::const_generic_fn_bool<false>();
40-
// gdb-check:[...]static fn function_names::const_generic_fn_non_int<{CONST#ad91263f6d2dd96e}>();
40+
// gdb-check:[...]static fn function_names::const_generic_fn_non_int<{CONST#[...]}>();
4141
// gdb-check:[...]static fn function_names::const_generic_fn_signed_int<-7>();
4242
// gdb-check:[...]static fn function_names::const_generic_fn_unsigned_int<14>();
4343

@@ -76,7 +76,7 @@
7676
// Const generic parameter
7777
// cdb-command:x a!function_names::const_generic_fn*
7878
// cdb-check:[...] a!function_names::const_generic_fn_bool<false> (void)
79-
// cdb-check:[...] a!function_names::const_generic_fn_non_int<CONST$ad91263f6d2dd96e> (void)
79+
// cdb-check:[...] a!function_names::const_generic_fn_non_int<CONST#[...]> (void)
8080
// cdb-check:[...] a!function_names::const_generic_fn_unsigned_int<14> (void)
8181
// cdb-check:[...] a!function_names::const_generic_fn_signed_int<-7> (void)
8282

tests/mir-opt/issue_99325.main.built.after.32bit.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| User Type Annotations
44
| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/issue_99325.rs:13:16: 13:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
5-
| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[d56d]::main::{constant#1}), args: [] }: &'static [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
5+
| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[d56d]::main::{constant#1}), args: [] }], user_self_ty: None }), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
66
|
77
fn main() -> () {
88
let mut _0: ();

tests/mir-opt/issue_99325.main.built.after.64bit.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| User Type Annotations
44
| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/issue_99325.rs:13:16: 13:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
5-
| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[d56d]::main::{constant#1}), args: [] }: &'static [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
5+
| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[d56d]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[d56d]::main::{constant#1}), args: [] }], user_self_ty: None }), max_universe: U0, variables: [], defining_opaque_types: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
66
|
77
fn main() -> () {
88
let mut _0: ();
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
//@ edition:2021
2+
//@ check-pass
23
// issues rust-lang/rust#111911
34
// test for ICE opaque type with non-universal region substs
45

56
#![feature(adt_const_params)]
67
#![allow(incomplete_features)]
78

89
pub async fn foo<const X: &'static str>() {}
9-
//~^ ERROR const parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
10-
//~| ERROR const parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
1110
fn bar<const N: &'static u8>() -> impl Sized {}
1211

1312
pub fn main() {}

tests/ui/const-generics/adt_const_params/opaque_type_with_non-universal_region_substs_ice-111911.stderr

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ LL | pub struct Dependent<T, const X: T>([(); X]);
66
|
77
= note: type parameters may not be used in the type of const parameters
88

9-
error: aborting due to 1 previous error
9+
error[E0392]: type parameter `T` is never used
10+
--> $DIR/const-param-type-depends-on-type-param.rs:11:22
11+
|
12+
LL | pub struct Dependent<T, const X: T>([(); X]);
13+
| ^ unused type parameter
14+
|
15+
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
16+
= help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead
17+
18+
error: aborting due to 2 previous errors
1019

11-
For more information about this error, try `rustc --explain E0770`.
20+
Some errors have detailed explanations: E0392, E0770.
21+
For more information about an error, try `rustc --explain E0392`.

tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ LL | pub struct Dependent<T, const X: T>([(); X]);
66
|
77
= note: type parameters may not be used in the type of const parameters
88

9-
error: aborting due to 1 previous error
9+
error[E0392]: type parameter `T` is never used
10+
--> $DIR/const-param-type-depends-on-type-param.rs:11:22
11+
|
12+
LL | pub struct Dependent<T, const X: T>([(); X]);
13+
| ^ unused type parameter
14+
|
15+
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
16+
= help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead
17+
18+
error: aborting due to 2 previous errors
1019

11-
For more information about this error, try `rustc --explain E0770`.
20+
Some errors have detailed explanations: E0392, E0770.
21+
For more information about an error, try `rustc --explain E0392`.

tests/ui/const-generics/const-param-type-depends-on-type-param.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010

1111
pub struct Dependent<T, const X: T>([(); X]);
1212
//~^ ERROR: the type of const parameters must not depend on other generic parameters
13+
//~| ERROR: type parameter `T` is never used
1314

1415
fn main() {}

0 commit comments

Comments
 (0)