-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 12 pull requests #101073
Closed
Closed
Rollup of 12 pull requests #101073
Conversation
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
We have `File::create` for creating a file or opening an existing file, but the secure way to guarantee creating a new file requires a longhand invocation via `OpenOptions`. Add `File::create_new` to handle this case, to make it easier for people to do secure file creation.
Apply the diagnostic migration lint to more functions on `Session`. Signed-off-by: David Wood <[email protected]>
Add impls of `IntoDiagnosticArg` for `std::io::Error`, `std::path::Path` and `std::path::PathBuf`. Signed-off-by: David Wood <[email protected]>
Migrate the `rustc_incremental` crate's diagnostics to translatable diagnostic structs. Signed-off-by: David Wood <[email protected]>
Reduce duplication by moving fetching logic into a dedicated function.
`writeln!` already includes a reference to `write!` for more information, so remove duplicated information.
Stabilization has been completed [here](rust-lang#92980 (comment)) with a FCP.
Related to rust-lang#100952 This is definitely not a complete solution, but it does shrink keysyms/index.html on smithay from 620K to 516K.
…rminal The UNIX and WASI implementations use `isatty`. The Windows implementation uses the same logic the `atty` crate uses, including the hack needed to detect msys terminals. Implement this trait for `File` and for `Stdin`/`Stdout`/`Stderr` and their locked counterparts on all platforms. On UNIX and WASI, implement it for `BorrowedFd`/`OwnedFd`. On Windows, implement it for `BorrowedHandle`/`OwnedHandle`. Based on rust-lang#91121 Co-authored-by: Matt Wilkinson <[email protected]>
If a process has no console, it'll have NULL in place of a console handle, so return early with `false` in that case without making any OS calls.
Rather than referencing a slice's pointer and then creating a new slice with a longer length, offset from the base structure pointer instead. This makes some choices of Rust semantics happier.
… r=joshtriplett Support parsing IP addresses from a byte string Fixes rust-lang#94821 The goal is to be able to parse addresses from a byte string without requiring to do any utf8 validation. Since internally the parser already works on byte strings, this should be possible and I personally already needed this in the past too. ~~I used the proposed approach from the issue by implementing `TryFrom<&'a [u8]>` for all 6 address types (3 ip address types and 3 socket address types). I believe implementing stable traits for stable types is insta-stable so this will probably need an FCP?~~ Switched to an unstable inherent method approach called `parse_ascii` as requested. cc ``@jyn514``
…ffset_from, r=Mark-Simulacrum Stabilize `const_ptr_offset_from`. Stabilization has been completed [here](rust-lang#92980 (comment)) with a FCP. Closes rust-lang#92980.
… r=thomcc Add `IsTerminal` trait to determine if a descriptor or handle is a terminal The UNIX implementation uses `isatty`. The Windows implementation uses the same logic the `atty` crate uses, including the hack needed to detect msys terminals. Implement this trait for `Stdin`/`Stdout`/`Stderr`/`File` on all platforms. On Unix, implement it for `BorrowedFd`/`OwnedFd`. On Windows, implement it for `BorrowedHandle`/`OwnedHandle`. Based on rust-lang#91121 Co-authored-by: Matt Wilkinson <[email protected]>
Add a `File::create_new` constructor We have `File::create` for creating a file or opening an existing file, but the secure way to guarantee creating a new file requires a longhand invocation via `OpenOptions`. Add `File::create_new` to handle this case, to make it easier for people to do secure file creation.
…, r=Mark-Simulacrum Make forward compatibility lint deprecated_cfg_attr_crate_type_name deny by default Turns the forward compatibility lint added by rust-lang#83744 to deprecate `cfg_attr` usage with `#![crate_type]` and `#![crate_name]` attributes into deny by default. Copying the example from rust-lang#83744: ```Rust #![crate_type = "lib"] // remains working #![cfg_attr(foo, crate_type = "bin")] // will stop working ``` Over 8 months have passed since rust-lang#83744 was merged so I'd say this gives ample time for people to have been warned, so we can make the warning stronger. No usage was found via grep.app except for one, which was in an unmaintained code base that didn't seem to be used in the open source eco system. The crater run conducted in rust-lang#83744 also didn't show up anything. cc rust-lang#91632 - tracking issue for the lint
… r=compiler-errors incremental: migrate diagnostics - Apply the diagnostic migration lints to more functions on `Session`, namely: `span_warn`, `span_warn_with_code`, `warn` `note_without_error`, `span_note_without_error`, `struct_note_without_error`. - Add impls of `IntoDiagnosticArg` for `std::io::Error`, `std::path::Path` and `std::path::PathBuf`. - Migrate the `rustc_incremental` crate's diagnostics to translatable diagnostic structs. r? ```@compiler-errors``` cc rust-lang#100717
Fix wrong compiletest filters on Windows As discussed in [rust-lang#79334](rust-lang#79334), when calling e.g. ``` python x.py test src/test/ui/expr/compound-assignment/eval-order.rs ``` on Windows, compiletest passes the filter `expr/compound-assignment/eval-order.rs` to libtest, which instead should be `expr\compound-assignment\eval-order.rs`, as that is the file found when collecting tests. This is what I fixed. I'm not sure how to organize a test for this. Any suggestions?
…mulacrum Smaller improvements of tidy and the unicode generator
…mulacrum Update documentation for `write!` and `writeln!` rust-lang#37472 added this documentation, but it needs updating: - Remove some documentation duplicated between `writeln!` and `write!` - Update `write!` docs: can now import traits as `_` to avoid conflicts - Expand example to show how to implement qualified trait names
…n, r=davidtwco Allow deriving multipart suggestions This turned into a bit more of a rewrite than I was initially hoping for... Still, I think the `SessionSubdiagnostic` derive is a little cleaner overall now, and closer to the `SessionDiagnostic` derive to make future code sharing easier. r? `@davidtwco`
Provide structured suggestion for `hashmap[idx] = val`
…block-short, r=GuillaumeGomez rustdoc: omit start/end tags for empty item description blocks Related to rust-lang#100952 This is definitely not a complete solution, but it does shrink keysyms/index.html on smithay from 620K to 516K.
rustbot
added
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
A-translation
Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Aug 27, 2022
@bors r+ rollup=never p=10 |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Aug 27, 2022
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors r- |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Aug 27, 2022
davidtwco
removed
the
A-translation
Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic
label
Oct 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
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:
const_ptr_offset_from
. #96240 (Stabilizeconst_ptr_offset_from
.)IsTerminal
trait to determine if a descriptor or handle is a terminal #98033 (AddIsTerminal
trait to determine if a descriptor or handle is a terminal)File::create_new
constructor #98801 (Add aFile::create_new
constructor)write!
andwriteln!
#100953 (Update documentation forwrite!
andwriteln!
)hashmap[idx] = val
#101002 (Provide structured suggestion forhashmap[idx] = val
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup