Skip to content
Open
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
1 change: 0 additions & 1 deletion src/tools/tidy/src/issues.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2892,7 +2892,6 @@ ui/typeck/issue-105946.rs
ui/typeck/issue-106929.rs
ui/typeck/issue-107087.rs
ui/typeck/issue-107775.rs
ui/typeck/issue-10969.rs
ui/typeck/issue-110017-format-into-help-deletes-macro.rs
ui/typeck/issue-110052.rs
ui/typeck/issue-112007-leaked-writeln-macro-internals.rs
Expand Down
8 changes: 8 additions & 0 deletions tests/ui/closures/simple-capture-and-call.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//! regression test for issue #1895
Copy link
Contributor Author

@reddevilmidzy reddevilmidzy Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was previously named issue-3429. However, this test appears to be unrelated to issue #3429

The name was changed in this commit, c75b763, but I'm not sure why.
So I reverted it back to the original issue number. #1895

//@ run-pass

fn main() {
let x = 1_usize;
let y = || x;
let _z = y();
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! regression test for issue #2642
//@ run-pass
#![allow(dead_code)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! regression test for issue #47673
//@ check-pass
#![allow(unused_imports)]

Expand Down
9 changes: 0 additions & 9 deletions tests/ui/issues/issue-22468.rs

This file was deleted.

16 changes: 0 additions & 16 deletions tests/ui/issues/issue-22468.stderr

This file was deleted.

7 changes: 0 additions & 7 deletions tests/ui/issues/issue-3429.rs

This file was deleted.

10 changes: 0 additions & 10 deletions tests/ui/issues/issue-3993.rs

This file was deleted.

15 changes: 0 additions & 15 deletions tests/ui/issues/issue-3993.stderr

This file was deleted.

6 changes: 0 additions & 6 deletions tests/ui/issues/issue-47377.rs

This file was deleted.

18 changes: 0 additions & 18 deletions tests/ui/issues/issue-47377.stderr

This file was deleted.

5 changes: 0 additions & 5 deletions tests/ui/issues/issue-47380.rs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! regression test for issue #3500
//@ run-pass

pub fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! regression test for issue #72933
//@ build-pass
// ignore-tidy-filelength
#![crate_type="rlib"]
#![crate_type = "rlib"]

fn banana(v: &str) -> u32 {
match v {
Expand Down
6 changes: 6 additions & 0 deletions tests/ui/privacy/private-item-simple.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
//! regression test for issue #3993

mod a {
fn f() {}
}

fn main() {
a::f(); //~ ERROR function `f` is private
}

fn foo() {
use a::f; //~ ERROR function `f` is private
}
18 changes: 15 additions & 3 deletions tests/ui/privacy/private-item-simple.stderr
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
error[E0603]: function `f` is private
--> $DIR/private-item-simple.rs:6:8
--> $DIR/private-item-simple.rs:12:12
|
LL | use a::f;
| ^ private function
|
note: the function `f` is defined here
--> $DIR/private-item-simple.rs:4:5
|
LL | fn f() {}
| ^^^^^^

error[E0603]: function `f` is private
--> $DIR/private-item-simple.rs:8:8
|
LL | a::f();
| ^ private function
|
note: the function `f` is defined here
--> $DIR/private-item-simple.rs:2:5
--> $DIR/private-item-simple.rs:4:5
|
LL | fn f() {}
| ^^^^^^

error: aborting due to 1 previous error
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0603`.
11 changes: 11 additions & 0 deletions tests/ui/str/str-add-operator.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//! regression test for issue #47377, #47380
// ignore-tidy-tab
fn main() {
let b = "hello";
let _a = b + ", World!";
//~^ ERROR E0369

let b = "hello";
println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
//~^ ERROR E0369
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
error[E0369]: cannot add `&str` to `&str`
--> $DIR/issue-47380.rs:3:35
--> $DIR/str-add-operator.rs:5:14
|
LL | let _a = b + ", World!";
| - ^ ---------- &str
| | |
| | `+` cannot be used to concatenate two `&str` strings
| &str
|
= note: string concatenation requires an owned `String` on the left
help: create an owned `String` from a string reference
|
LL | let _a = b.to_owned() + ", World!";
| +++++++++++

error[E0369]: cannot add `&str` to `&str`
--> $DIR/str-add-operator.rs:9:35
|
LL | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
| - ^ ---------- &str
Expand All @@ -13,6 +28,6 @@ help: create an owned `String` from a string reference
LL | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
| +++++++++++

error: aborting due to 1 previous error
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0369`.
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
//@ run-pass
// regression test for issue #50825
// Check that the feature gate normalizes associated types.
//! regression test for issue #50825, #51044
//! Check that the feature gate normalizes associated types.

#![allow(dead_code)]
struct Foo<T>(T);
struct Duck;
struct Quack;

trait Hello<A> where A: Animal {
trait Hello<A>
where
A: Animal,
{
}

trait Animal {
type Noise;
}

trait Loud<R> {
}
trait Loud<R> {}

impl Loud<Quack> for f32 {
}
impl Loud<Quack> for f32 {}

impl Animal for Duck {
type Noise = Quack;
}

impl Hello<Duck> for Foo<f32> where f32: Loud<<Duck as Animal>::Noise> {
}
impl Hello<Duck> for Foo<f32> where f32: Loud<<Duck as Animal>::Noise> {}

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! regression test for issue #2151

fn main() {
let x = panic!(); //~ ERROR type annotations needed
x.clone();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0282]: type annotations needed
--> $DIR/issue-2151.rs:2:9
--> $DIR/never-type-inference-fail.rs:4:9
|
LL | let x = panic!();
| ^
Expand Down
7 changes: 0 additions & 7 deletions tests/ui/typeck/issue-10969.rs

This file was deleted.

23 changes: 0 additions & 23 deletions tests/ui/typeck/issue-10969.stderr

This file was deleted.

19 changes: 19 additions & 0 deletions tests/ui/typeck/non-function-call-error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//! Regression test for issue #10969, #22468

fn main() {
let foo = "bar";
let x = foo("baz");
//~^ ERROR: expected function, found `&str`

let i = 0i32;
i();
//~^ ERROR expected function, found `i32`
}

fn foo(file: &str) -> bool {
true
}

fn func(i: i32) {
i(); //~ERROR expected function, found `i32`
}
36 changes: 36 additions & 0 deletions tests/ui/typeck/non-function-call-error.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
error[E0618]: expected function, found `&str`
--> $DIR/non-function-call-error.rs:5:13
|
LL | let foo = "bar";
| --- `foo` has type `&str`
LL | let x = foo("baz");
| ^^^-------
| |
| call expression requires function
...
LL | fn foo(file: &str) -> bool {
| -------------------------- this function of the same name is available here, but it's shadowed by the local binding

error[E0618]: expected function, found `i32`
--> $DIR/non-function-call-error.rs:9:5
|
LL | let i = 0i32;
| - `i` has type `i32`
LL | i();
| ^--
| |
| call expression requires function

error[E0618]: expected function, found `i32`
--> $DIR/non-function-call-error.rs:18:5
|
LL | fn func(i: i32) {
| - `i` has type `i32`
LL | i();
| ^--
| |
| call expression requires function

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0618`.
Loading