mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Auto merge of #16398 - Urhengulas:satisfy-clippy, r=Veykril
`cargo clippy --fix` This PR is the result of running `cargo clippy --fix && cargo fmt` in the root of the repository. I did not manually review all the changes, but just skimmed through a few of them. The tests still pass, so it seems fine.
This commit is contained in:
commit
85c9a83262
175 changed files with 592 additions and 735 deletions
|
@ -130,10 +130,10 @@ fn external_docs_doc_builtin_type() {
|
|||
//- /main.rs crate:foo
|
||||
let x: u3$02 = 0;
|
||||
"#,
|
||||
Some(&OsStr::new("/home/user/project")),
|
||||
Some(OsStr::new("/home/user/project")),
|
||||
Some(expect![[r#"https://doc.rust-lang.org/nightly/core/primitive.u32.html"#]]),
|
||||
Some(expect![[r#"file:///sysroot/share/doc/rust/html/core/primitive.u32.html"#]]),
|
||||
Some(&OsStr::new("/sysroot")),
|
||||
Some(OsStr::new("/sysroot")),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -146,10 +146,10 @@ use foo$0::Foo;
|
|||
//- /lib.rs crate:foo
|
||||
pub struct Foo;
|
||||
"#,
|
||||
Some(&OsStr::new("/home/user/project")),
|
||||
Some(OsStr::new("/home/user/project")),
|
||||
Some(expect![[r#"https://docs.rs/foo/*/foo/index.html"#]]),
|
||||
Some(expect![[r#"file:///home/user/project/doc/foo/index.html"#]]),
|
||||
Some(&OsStr::new("/sysroot")),
|
||||
Some(OsStr::new("/sysroot")),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -160,10 +160,10 @@ fn external_docs_doc_url_std_crate() {
|
|||
//- /main.rs crate:std
|
||||
use self$0;
|
||||
"#,
|
||||
Some(&OsStr::new("/home/user/project")),
|
||||
Some(OsStr::new("/home/user/project")),
|
||||
Some(expect!["https://doc.rust-lang.org/stable/std/index.html"]),
|
||||
Some(expect!["file:///sysroot/share/doc/rust/html/std/index.html"]),
|
||||
Some(&OsStr::new("/sysroot")),
|
||||
Some(OsStr::new("/sysroot")),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -174,10 +174,10 @@ fn external_docs_doc_url_struct() {
|
|||
//- /main.rs crate:foo
|
||||
pub struct Fo$0o;
|
||||
"#,
|
||||
Some(&OsStr::new("/home/user/project")),
|
||||
Some(OsStr::new("/home/user/project")),
|
||||
Some(expect![[r#"https://docs.rs/foo/*/foo/struct.Foo.html"#]]),
|
||||
Some(expect![[r#"file:///home/user/project/doc/foo/struct.Foo.html"#]]),
|
||||
Some(&OsStr::new("/sysroot")),
|
||||
Some(OsStr::new("/sysroot")),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -188,10 +188,10 @@ fn external_docs_doc_url_windows_backslash_path() {
|
|||
//- /main.rs crate:foo
|
||||
pub struct Fo$0o;
|
||||
"#,
|
||||
Some(&OsStr::new(r"C:\Users\user\project")),
|
||||
Some(OsStr::new(r"C:\Users\user\project")),
|
||||
Some(expect![[r#"https://docs.rs/foo/*/foo/struct.Foo.html"#]]),
|
||||
Some(expect![[r#"file:///C:/Users/user/project/doc/foo/struct.Foo.html"#]]),
|
||||
Some(&OsStr::new("/sysroot")),
|
||||
Some(OsStr::new("/sysroot")),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -202,10 +202,10 @@ fn external_docs_doc_url_windows_slash_path() {
|
|||
//- /main.rs crate:foo
|
||||
pub struct Fo$0o;
|
||||
"#,
|
||||
Some(&OsStr::new(r"C:/Users/user/project")),
|
||||
Some(OsStr::new(r"C:/Users/user/project")),
|
||||
Some(expect![[r#"https://docs.rs/foo/*/foo/struct.Foo.html"#]]),
|
||||
Some(expect![[r#"file:///C:/Users/user/project/doc/foo/struct.Foo.html"#]]),
|
||||
Some(&OsStr::new("/sysroot")),
|
||||
Some(OsStr::new("/sysroot")),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue