diff options
| author | Ralf Jung <post@ralfj.de> | 2023-09-09 17:39:53 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-09-09 17:39:53 +0200 |
| commit | c2a7e684cd43f449bc40a696dbf9b69ebccc33c3 (patch) | |
| tree | d3127cf14e679e075e02bb2c34f87f7e913a5c43 /tests | |
| parent | a5b031136702068e4a82d384fec1e66503974064 (diff) | |
| download | rust-c2a7e684cd43f449bc40a696dbf9b69ebccc33c3.tar.gz rust-c2a7e684cd43f449bc40a696dbf9b69ebccc33c3.zip | |
use hir_crate_items(()).definitions() instead of hir().items()
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/abi/debug.stderr | 188 | ||||
| -rw-r--r-- | tests/ui/layout/debug.stderr | 12 |
2 files changed, 100 insertions, 100 deletions
diff --git a/tests/ui/abi/debug.stderr b/tests/ui/abi/debug.stderr index 0ca74fdda35..c0c808c1ede 100644 --- a/tests/ui/abi/debug.stderr +++ b/tests/ui/abi/debug.stderr @@ -268,100 +268,6 @@ error: `#[rustc_abi]` can only be applied to function items, type aliases, and a LL | const C: () = (); | ^^^^^^^^^^^ -error: `#[rustc_abi]` can only be applied to function items, type aliases, and associated functions - --> $DIR/debug.rs:28:5 - | -LL | const C: () = (); - | ^^^^^^^^^^^ - -error: fn_abi_of(assoc_test) = FnAbi { - args: [ - ArgAbi { - layout: TyAndLayout { - ty: &S, - layout: Layout { - size: $SOME_SIZE, - align: AbiAndPrefAlign { - abi: $SOME_ALIGN, - pref: $SOME_ALIGN, - }, - abi: Scalar( - Initialized { - value: Pointer( - AddressSpace( - 0, - ), - ), - valid_range: $NON_NULL, - }, - ), - fields: Primitive, - largest_niche: Some( - Niche { - offset: Size(0 bytes), - value: Pointer( - AddressSpace( - 0, - ), - ), - valid_range: $NON_NULL, - }, - ), - variants: Single { - index: 0, - }, - max_repr_align: None, - unadjusted_abi_align: $SOME_ALIGN, - }, - }, - mode: Direct( - ArgAttributes { - regular: NoAlias | NonNull | ReadOnly | NoUndef, - arg_ext: None, - pointee_size: Size(2 bytes), - pointee_align: Some( - Align(2 bytes), - ), - }, - ), - }, - ], - ret: ArgAbi { - layout: TyAndLayout { - ty: (), - layout: Layout { - size: Size(0 bytes), - align: AbiAndPrefAlign { - abi: $SOME_ALIGN, - pref: $SOME_ALIGN, - }, - abi: Aggregate { - sized: true, - }, - fields: Arbitrary { - offsets: [], - memory_index: [], - }, - largest_niche: None, - variants: Single { - index: 0, - }, - max_repr_align: None, - unadjusted_abi_align: $SOME_ALIGN, - }, - }, - mode: Ignore, - }, - c_variadic: false, - fixed_count: 1, - conv: Rust, - can_unwind: $SOME_BOOL, - } - --> $DIR/debug.rs:33:5 - | -LL | fn assoc_test(&self) { } - | ^^^^^^^^^^^^^^^^^^^^ - error: ABIs are not compatible left ABI = FnAbi { args: [ @@ -954,6 +860,100 @@ LL | type TestAbiEqNonsense = (fn((str, str)), fn((str, str))); = help: the trait `Sized` is not implemented for `str` = note: only the last element of a tuple may have a dynamically sized type +error: `#[rustc_abi]` can only be applied to function items, type aliases, and associated functions + --> $DIR/debug.rs:28:5 + | +LL | const C: () = (); + | ^^^^^^^^^^^ + +error: fn_abi_of(assoc_test) = FnAbi { + args: [ + ArgAbi { + layout: TyAndLayout { + ty: &S, + layout: Layout { + size: $SOME_SIZE, + align: AbiAndPrefAlign { + abi: $SOME_ALIGN, + pref: $SOME_ALIGN, + }, + abi: Scalar( + Initialized { + value: Pointer( + AddressSpace( + 0, + ), + ), + valid_range: $NON_NULL, + }, + ), + fields: Primitive, + largest_niche: Some( + Niche { + offset: Size(0 bytes), + value: Pointer( + AddressSpace( + 0, + ), + ), + valid_range: $NON_NULL, + }, + ), + variants: Single { + index: 0, + }, + max_repr_align: None, + unadjusted_abi_align: $SOME_ALIGN, + }, + }, + mode: Direct( + ArgAttributes { + regular: NoAlias | NonNull | ReadOnly | NoUndef, + arg_ext: None, + pointee_size: Size(2 bytes), + pointee_align: Some( + Align(2 bytes), + ), + }, + ), + }, + ], + ret: ArgAbi { + layout: TyAndLayout { + ty: (), + layout: Layout { + size: Size(0 bytes), + align: AbiAndPrefAlign { + abi: $SOME_ALIGN, + pref: $SOME_ALIGN, + }, + abi: Aggregate { + sized: true, + }, + fields: Arbitrary { + offsets: [], + memory_index: [], + }, + largest_niche: None, + variants: Single { + index: 0, + }, + max_repr_align: None, + unadjusted_abi_align: $SOME_ALIGN, + }, + }, + mode: Ignore, + }, + c_variadic: false, + fixed_count: 1, + conv: Rust, + can_unwind: $SOME_BOOL, + } + --> $DIR/debug.rs:33:5 + | +LL | fn assoc_test(&self) { } + | ^^^^^^^^^^^^^^^^^^^^ + error: aborting due to 11 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/layout/debug.stderr b/tests/ui/layout/debug.stderr index 0910db69129..59df10b737b 100644 --- a/tests/ui/layout/debug.stderr +++ b/tests/ui/layout/debug.stderr @@ -557,12 +557,6 @@ error: `#[rustc_layout]` can only be applied to `struct`/`enum`/`union` declarat LL | const C: () = (); | ^^^^^^^^^^^ -error: `#[rustc_layout]` can only be applied to `struct`/`enum`/`union` declarations and type aliases - --> $DIR/debug.rs:74:5 - | -LL | const C: () = (); - | ^^^^^^^^^^^ - error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/debug.rs:78:1 | @@ -572,6 +566,12 @@ LL | type Impossible = (str, str); = help: the trait `Sized` is not implemented for `str` = note: only the last element of a tuple may have a dynamically sized type +error: `#[rustc_layout]` can only be applied to `struct`/`enum`/`union` declarations and type aliases + --> $DIR/debug.rs:74:5 + | +LL | const C: () = (); + | ^^^^^^^^^^^ + error: aborting due to 17 previous errors For more information about this error, try `rustc --explain E0277`. |
