-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rolling up PRs in the queue #15377
Merged
Merged
Rolling up PRs in the queue #15377
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
This commit changes `os` in three ways: * It adds a `join_paths` function that is the converse to `split_paths`, easing manipulation of the `PATH` environment variable according to platform conventions. * **Breaking change**: It changes `split_paths` to no longer drop empty paths, since they are meaningful to some shells (where they are synonymous with the current working directory). * It changes `setenv` to take a `BytesContainer` rather than a `&str` value, since environment variables may have non-utf8 values on some platforms. Since `&str` is a `BytesContainer`, this is *not* a breaking change. Along the way, it also refactors the `split_paths` function so that `cfg` switches are applied internally (and the function header is given only once). This fixes a bug: the doc comment had an example for only one platform. [breaking-change]
Just a few words about functions and defining them.
Rationale: for what appear to be historical reasons only, the PatIdent contains a Path rather than an Ident. This means that there are many places in the code where an ident is artificially promoted to a path, and---much more problematically--- a bunch of elements from a path are simply thrown away, which seems like an invitation to some really nasty bugs. This commit replaces the Path in a PatIdent with a SpannedIdent, which just contains an ident and a span.
This can break code that looked like: struct S<T> { val: T, } trait Gettable<T> { ... } impl<T: Copy> Gettable<T> for S<T> { ... } let t: Box<S<String>> = box S { val: "one".to_string(), }; let a = t as Box<Gettable<String>>; // ^ note no `Copy` bound Change this code to: impl<T> Gettable<T> for S<T> { // ^ remove `Copy` bound ... } Closes rust-lang#14061. [breaking-change]
- examples for connect and concat - also fixed extra word in existing docs
- When the timezone is UTC, the "zone" field of the RFC 822 format is "GMT" (or "UT"), not "UTC." - Although the name of `rfc3999` refers to RFC 3999, the documentation of it refers only to ISO 8601. This commit adds a description of the relation between ISO 8601 and RFC 3999. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
bors
added a commit
that referenced
this pull request
Jul 3, 2014
Closes #15276 (Guide: if) Closes #15280 (std::os - Add join_paths, make setenv non-utf8 capable) Closes #15314 (Guide: functions) Closes #15327 (Simplify PatIdent to contain an Ident rather than a Path) Closes #15340 (Guide: add mutable binding section) Closes #15342 (Fix ICE with nested macro_rules!-style macros) Closes #15350 (Remove duplicated slash in install script path) Closes #15351 (correct a few spelling mistakes in the tutorial) Closes #15352 (librustc: Have the kind checker check sub-bounds in trait casts.) Closes #15359 (Fix spelling errors.) Closes #15361 (Rename set_broadast() to set_broadcast().) Closes #15366 (Simplify creating a parser from a token tree) Closes #15367 (Add examples for StrVector methods) Closes #15372 (Vec::grow should use reserve_additional, Vec::reserve should check against capacity) Closes #15373 (Fix minor issues in the documentation of libtime.)
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 7, 2023
Add ExternCrateDecl to HIR Adding these doesn't really require much design effort as they represent a single import, unlike use trees which are one item that represent 0 or more imports. We only resolve to this definition when actually resolving on the name or alias of an `extern crate name as alias` item, not usages yet as that requires far more changes that won't lead anywhere without giving it more thought. Nevertheless the changes slightly improve IDE things, an example being hover on the decl showing the merged doc comments for example. cc rust-lang/rust-analyzer#14079
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.
Closes #15276 (Guide: if)
Closes #15280 (std::os - Add join_paths, make setenv non-utf8 capable)
Closes #15314 (Guide: functions)
Closes #15327 (Simplify PatIdent to contain an Ident rather than a Path)
Closes #15340 (Guide: add mutable binding section)
Closes #15342 (Fix ICE with nested macro_rules!-style macros)
Closes #15350 (Remove duplicated slash in install script path)
Closes #15351 (correct a few spelling mistakes in the tutorial)
Closes #15352 (librustc: Have the kind checker check sub-bounds in trait casts.)
Closes #15359 (Fix spelling errors.)
Closes #15361 (Rename set_broadast() to set_broadcast().)
Closes #15366 (Simplify creating a parser from a token tree)
Closes #15367 (Add examples for StrVector methods)
Closes #15372 (Vec::grow should use reserve_additional, Vec::reserve should check against capacity)
Closes #15373 (Fix minor issues in the documentation of libtime.)