forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#88914 - GuillaumeGomez:rollup-h5svc6w, r=Guil…
…laumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#88033 (Add links for primitives in "jump to definition" feature) - rust-lang#88722 (Make `UnsafeCell::get_mut` const) - rust-lang#88851 (Fix duplicate bounds for const_trait_impl) - rust-lang#88859 (interpreter PointerArithmetic: use new Size helper methods) - rust-lang#88885 (Fix jump def background) - rust-lang#88894 (Improve error message for missing trait in trait impl) - rust-lang#88896 (Reduce possibility of flaky tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
19 changed files
with
165 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// We check the background color on the jump to definition links in the source code page. | ||
goto: file://|DOC_PATH|/src/link_to_definition/lib.rs.html | ||
|
||
// Set the theme to dark. | ||
local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"} | ||
// We reload the page so the local storage settings are being used. | ||
reload: | ||
|
||
assert-css: ("body.source .example-wrap pre.rust a", {"background-color": "rgb(51, 51, 51)"}, ALL) | ||
|
||
// Set the theme to ayu. | ||
local-storage: {"rustdoc-theme": "ayu", "rustdoc-preferred-dark-theme": "ayu", "rustdoc-use-system-theme": "false"} | ||
// We reload the page so the local storage settings are being used. | ||
reload: | ||
|
||
assert-css: ("body.source .example-wrap pre.rust a", {"background-color": "rgb(51, 51, 51)"}, ALL) | ||
|
||
// Set the theme to light. | ||
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"} | ||
// We reload the page so the local storage settings are being used. | ||
reload: | ||
|
||
assert-css: ("body.source .example-wrap pre.rust a", {"background-color": "rgb(238, 238, 238)"}, ALL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file is automatically @generated by Cargo. | ||
# It is not intended for manual editing. | ||
version = 3 | ||
|
||
[[package]] | ||
name = "link_to_definition" | ||
version = "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "link_to_definition" | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
[lib] | ||
path = "lib.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pub struct Bar { | ||
pub a: String, | ||
pub b: u32, | ||
} | ||
|
||
pub fn foo(_b: &Bar) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// compile-flags: -Zunstable-options --generate-link-to-definition | ||
|
||
#![crate_name = "foo"] | ||
|
||
// @has 'src/foo/check-source-code-urls-to-def-std.rs.html' | ||
|
||
fn babar() {} | ||
|
||
// @has - '//a[@href="{{channel}}/std/primitive.u32.html"]' 'u32' | ||
// @has - '//a[@href="{{channel}}/std/primitive.str.html"]' 'str' | ||
// @has - '//a[@href="{{channel}}/std/primitive.bool.html"]' 'bool' | ||
// @has - '//a[@href="../../src/foo/check-source-code-urls-to-def-std.rs.html#7"]' 'babar' | ||
pub fn foo(a: u32, b: &str, c: String) { | ||
let x = 12; | ||
let y: bool = true; | ||
babar(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Regression test for #88818 (improve error message for missing trait | ||
// in `impl for X`). | ||
|
||
struct S { } | ||
impl for S { } | ||
//~^ ERROR: missing trait in a trait impl | ||
//~| HELP: add a trait here | ||
//~| HELP: for an inherent impl, drop this `for` | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
error: missing trait in a trait impl | ||
--> $DIR/issue-88818.rs:5:5 | ||
| | ||
LL | impl for S { } | ||
| ^ | ||
| | ||
help: add a trait here | ||
| | ||
LL | impl Trait for S { } | ||
| +++++ | ||
help: for an inherent impl, drop this `for` | ||
| | ||
LL - impl for S { } | ||
LL + impl S { } | ||
| | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters