-
Notifications
You must be signed in to change notification settings - Fork 1.7k
try reading rust-version from Cargo.toml #8774
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
Changes from all commits
81737bf
83511d1
6384765
f0a1cd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "fail-both-diff" | ||
version = "0.1.0" | ||
rust-version = "1.56" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
msrv = "1.59" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![deny(clippy::use_self)] | ||
|
||
pub struct Foo; | ||
|
||
impl Foo { | ||
pub fn bar() -> Foo { | ||
Foo | ||
} | ||
} | ||
|
||
fn main() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
warning: the MSRV in `clippy.toml` and `Cargo.toml` differ; using `1.59.0` from `clippy.toml` | ||
|
||
error: unnecessary structure name repetition | ||
--> $DIR/main.rs:6:21 | ||
| | ||
LL | pub fn bar() -> Foo { | ||
| ^^^ help: use the applicable keyword: `Self` | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/main.rs:1:9 | ||
| | ||
LL | #![deny(clippy::use_self)] | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error; 1 warning emitted | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "fail-both-same" | ||
version = "0.1.0" | ||
rust-version = "1.57.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
msrv = "1.57" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![deny(clippy::use_self)] | ||
|
||
pub struct Foo; | ||
|
||
impl Foo { | ||
pub fn bar() -> Foo { | ||
Foo | ||
} | ||
} | ||
|
||
fn main() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: unnecessary structure name repetition | ||
--> $DIR/main.rs:6:21 | ||
| | ||
LL | pub fn bar() -> Foo { | ||
| ^^^ help: use the applicable keyword: `Self` | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/main.rs:1:9 | ||
| | ||
LL | #![deny(clippy::use_self)] | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "fail-cargo" | ||
version = "0.1.0" | ||
rust-version = "1.56.1" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![deny(clippy::use_self)] | ||
|
||
pub struct Foo; | ||
|
||
impl Foo { | ||
pub fn bar() -> Foo { | ||
Foo | ||
} | ||
} | ||
|
||
fn main() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: unnecessary structure name repetition | ||
--> $DIR/main.rs:6:21 | ||
| | ||
LL | pub fn bar() -> Foo { | ||
| ^^^ help: use the applicable keyword: `Self` | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/main.rs:1:9 | ||
| | ||
LL | #![deny(clippy::use_self)] | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "fail-clippy" | ||
version = "0.1.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
msrv = "1.58" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![deny(clippy::use_self)] | ||
|
||
pub struct Foo; | ||
|
||
impl Foo { | ||
pub fn bar() -> Foo { | ||
Foo | ||
} | ||
} | ||
|
||
fn main() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: unnecessary structure name repetition | ||
--> $DIR/main.rs:6:21 | ||
| | ||
LL | pub fn bar() -> Foo { | ||
| ^^^ help: use the applicable keyword: `Self` | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/main.rs:1:9 | ||
| | ||
LL | #![deny(clippy::use_self)] | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "fail-file-attr" | ||
version = "0.1.0" | ||
rust-version = "1.13" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
msrv = "1.13.0" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// FIXME: this should produce a warning, because the attribute says 1.58 and the cargo.toml file | ||
// says 1.13 | ||
|
||
#![feature(custom_inner_attributes)] | ||
#![clippy::msrv = "1.58.0"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, this doesn't produce a warning. That is not optimal, but I wouldn't try to address this in this PR. Can you add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe abandon that attribute in the long run? ;) |
||
#![deny(clippy::use_self)] | ||
|
||
pub struct Foo; | ||
|
||
impl Foo { | ||
pub fn bar() -> Foo { | ||
Foo | ||
} | ||
} | ||
|
||
fn main() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: unnecessary structure name repetition | ||
--> $DIR/main.rs:11:21 | ||
| | ||
LL | pub fn bar() -> Foo { | ||
| ^^^ help: use the applicable keyword: `Self` | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/main.rs:6:9 | ||
| | ||
LL | #![deny(clippy::use_self)] | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "fail-both-same" | ||
version = "0.1.0" | ||
rust-version = "1.13.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
msrv = "1.13" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![deny(clippy::use_self)] | ||
|
||
pub struct Foo; | ||
|
||
impl Foo { | ||
pub fn bar() -> Foo { | ||
Foo | ||
} | ||
} | ||
|
||
fn main() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "fail-cargo" | ||
version = "0.1.0" | ||
rust-version = "1.13.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![deny(clippy::use_self)] | ||
|
||
pub struct Foo; | ||
|
||
impl Foo { | ||
pub fn bar() -> Foo { | ||
Foo | ||
} | ||
} | ||
|
||
fn main() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "fail-clippy" | ||
version = "0.1.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
msrv = "1.13" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![deny(clippy::use_self)] | ||
|
||
pub struct Foo; | ||
|
||
impl Foo { | ||
pub fn bar() -> Foo { | ||
Foo | ||
} | ||
} | ||
|
||
fn main() {} |
Uh oh!
There was an error while loading. Please reload this page.