Skip to content

tests/ui: A New Order [0/28] #143908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0452]: malformed lint attribute input
--> $DIR/deduplicate-diagnostics.rs:8:8
--> $DIR/deduplicate-diagnostics.rs:10:8
|
LL | #[deny("literal")]
| ^^^^^^^^^ bad attribute argument

error: cannot find derive macro `Unresolved` in this scope
--> $DIR/deduplicate-diagnostics.rs:4:10
--> $DIR/deduplicate-diagnostics.rs:6:10
|
LL | #[derive(Unresolved)]
| ^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
error[E0452]: malformed lint attribute input
--> $DIR/deduplicate-diagnostics.rs:8:8
--> $DIR/deduplicate-diagnostics.rs:10:8
|
LL | #[deny("literal")]
| ^^^^^^^^^ bad attribute argument

error: cannot find derive macro `Unresolved` in this scope
--> $DIR/deduplicate-diagnostics.rs:4:10
--> $DIR/deduplicate-diagnostics.rs:6:10
|
LL | #[derive(Unresolved)]
| ^^^^^^^^^^

error: cannot find derive macro `Unresolved` in this scope
--> $DIR/deduplicate-diagnostics.rs:4:10
--> $DIR/deduplicate-diagnostics.rs:6:10
|
LL | #[derive(Unresolved)]
| ^^^^^^^^^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0452]: malformed lint attribute input
--> $DIR/deduplicate-diagnostics.rs:8:8
--> $DIR/deduplicate-diagnostics.rs:10:8
|
LL | #[deny("literal")]
| ^^^^^^^^^ bad attribute argument
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0452]: malformed lint attribute input
--> $DIR/deduplicate-diagnostics.rs:8:8
--> $DIR/deduplicate-diagnostics.rs:10:8
|
LL | #[deny("literal")]
| ^^^^^^^^^ bad attribute argument
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test that `-Z deduplicate-diagnostics` flag properly deduplicates diagnostic messages.

//@ revisions: duplicate deduplicate
//@[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
//! Smoke test for println!() with debug format specifiers.
//@ run-pass

#[derive(Debug)]
enum Numbers {
Three
Three,
}

pub fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//! This is a regression test for https://github.com/rust-lang/rust/issues/140686.
//! Although this is a ld64(ld-classic) bug, we still need to support it
//! due to cross-compilation and support for older Xcode.

//@ compile-flags: -Copt-level=3 -Ccodegen-units=256 -Clink-arg=-ld_classic
//@ run-pass
//@ only-x86_64-apple-darwin

// This is a regression test for https://github.com/rust-lang/rust/issues/140686.
// Although this is a ld64(ld-classic) bug, we still need to support it
// due to cross-compilation and support for older Xcode.

fn main() {
let dst: Vec<u8> = Vec::new();
let len = broken_func(std::hint::black_box(2), dst);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test that generic parameters shadow structs and modules with the same name.

struct T { i: i32 }
fn f<T>() {
let t = T { i: 0 }; //~ ERROR expected struct, variant or union type, found type parameter `T`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0574]: expected struct, variant or union type, found type parameter `T`
--> $DIR/lexical-scopes.rs:3:13
--> $DIR/shadowing-generic-item.rs:5:13
|
LL | struct T { i: i32 }
| - you might have meant to refer to this struct
Expand All @@ -9,7 +9,7 @@ LL | let t = T { i: 0 };
| ^ not a struct, variant or union type

error[E0599]: no function or associated item named `f` found for type parameter `Foo` in the current scope
--> $DIR/lexical-scopes.rs:10:10
--> $DIR/shadowing-generic-item.rs:12:10
|
LL | fn g<Foo>() {
| --- function or associated item `f` not found for this type parameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Test that the symbol mangling of Foo-the-constructor-function versus Foo-the-type do not collide

//@ run-pass

fn size_of_val<T>(_: &T) -> usize {
Expand All @@ -6,8 +8,6 @@ fn size_of_val<T>(_: &T) -> usize {

struct Foo(#[allow(dead_code)] i64);

// Test that the (symbol) mangling of `Foo` (the `struct` type) and that of
// `typeof Foo` (the function type of the `struct` constructor) don't collide.
fn main() {
size_of_val(&Foo(0));
size_of_val(&Foo);
Expand Down
Loading