Rollup of 5 pull requests#102504
Closed
matthiaskrgr wants to merge 29 commits intorust-lang:masterfrom
Closed
Conversation
On targets with `default_hidden_visibility` set, which is currrently just WebAssembly, declare the generated `main` function with visibility hidden. This makes it consistent with clang's WebAssembly target, where `main` is just a user function that gets the same visibility as any other user function, which is hidden on WebAssembly unless explicitly overridden. This will help simplify use cases which in the future may want to automatically wasm-export all visibility-"default" symbols. `main` isn't intended to be wasm-exported, and marking it hidden prevents it from being wasm-exported in that scenario.
The Run button isn't inside the `<pre>` any more. It's instead nested below the example wrapper. The class name can't be removed from the DOM, because `main.js` uses it.
These rules were added in dc2c972 to work with CSS transitions. They're otherwise redundant, since the `visibility` property already hides everything. https://github.com/rust-lang/rust/blob/dc2c9723343c985740be09919236a6e96c4e4433/src/librustdoc/html/static/css/rustdoc.css#L350-L354 The transition was remove with 237d625, but the now-redundant `opacity` property was not.
…ics, r=davidtwco Migrate rustc_codegen_gcc to SessionDiagnostics As part of rust-lang#100717 this pr migrates diagnostics to `SessionDiagnostics` for the `rustc_codegen_gcc` crate. `@rustbot` label +A-translation
…finition, r=fee1-dead
Improve errors for incomplete functions in struct definitions
Given the following code:
```rust
fn main() {}
struct Foo {
fn
}
```
[playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=29139f870511f6918324be5ddc26c345)
The current output is:
```
Compiling playground v0.0.1 (/playground)
error: functions are not allowed in struct definitions
--> src/main.rs:4:5
|
4 | fn
| ^^
|
= help: unlike in C++, Java, and C#, functions are declared in `impl` blocks
= help: see https://doc.rust-lang.org/book/ch05-03-method-syntax.html for more information
error: could not compile `playground` due to previous error
```
In this case, rustc should suggest escaping `fn` to use it as an identifier.
…n, r=nagisa Declare `main` as visibility hidden on targets that default to hidden. On targets with `default_hidden_visibility` set, which is currrently just WebAssembly, declare the generated `main` function with visibility hidden. This makes it consistent with clang's WebAssembly target, where `main` is just a user function that gets the same visibility as any other user function, which is hidden on WebAssembly unless explicitly overridden. This will help simplify use cases which in the future may want to automatically wasm-export all visibility-"default" symbols. `main` isn't intended to be wasm-exported, and marking it hidden prevents it from being wasm-exported in that scenario.
…endered, r=GuillaumeGomez
rustdoc: remove unneeded CSS `.rust-example-rendered { position }`
The Run button isn't inside the `<pre>` any more. It's instead nested below the example wrapper.
The class name can't be removed from the DOM, because `main.js` uses it.
…y, r=GuillaumeGomez rustdoc: remove no-op source sidebar `opacity` These rules were added in dc2c972 to work with CSS transitions. They're otherwise redundant, since the `visibility` property already hides everything. https://github.com/rust-lang/rust/blob/dc2c9723343c985740be09919236a6e96c4e4433/src/librustdoc/html/static/css/rustdoc.css#L350-L354 The transition was remove with 237d625, but the now-redundant `opacity` property was not.
Member
Author
|
@bors r+ rollup=never p=5 |
Collaborator
Collaborator
|
⌛ Testing commit b23a0f6 with merge 9d8581b45b462bc4cbccedc60d37ef92d141c2df... |
Collaborator
|
💔 Test failed - checks-actions |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
mainas visibility hidden on targets that default to hidden. #102424 (Declaremainas visibility hidden on targets that default to hidden.).rust-example-rendered { position }#102481 (rustdoc: remove unneeded CSS.rust-example-rendered { position })opacity#102491 (rustdoc: remove no-op source sidebaropacity)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup