Skip to content

Commit

Permalink
update test output
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Dec 12, 2024
1 parent 887b119 commit ab57d60
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/ui/lint/lint-unconditional-recursion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ pub struct Point {
pub y: f32,
}

impl Default for Point {
impl Default for Point { //~ WARN
fn default() -> Self { //~ ERROR function cannot return without recursing
Point {
x: Default::default(),
Expand Down
20 changes: 19 additions & 1 deletion tests/ui/lint/lint-unconditional-recursion.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,23 @@ LL | ..Default::default()
|
= help: a `loop` may express intention better if this is on purpose

error: aborting due to 18 previous errors
warning: `impl Default` that could be derived
--> $DIR/lint-unconditional-recursion.rs:185:1
|
LL | / impl Default for Point {
LL | | fn default() -> Self {
LL | | Point {
LL | | x: Default::default(),
... |
LL | | }
LL | | }
| |_^
|
= note: `#[warn(default_could_be_derived)]` on by default
help: you don't need to manually `impl Default`, you can derive it
|
LL ~ #[derive(Default)] pub struct Point {
|

error: aborting due to 18 previous errors; 1 warning emitted

0 comments on commit ab57d60

Please sign in to comment.