-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Rollup 2014 12 03 #19507
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
Closed
Closed
Rollup 2014 12 03 #19507
Conversation
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
We don't need this &mut, and vec could use []s
There ain’t an RFC 248, while 438 looks to be what is being referred to: https://github.com/rust-lang/rfcs/blob/master/text/0438-precedence-of-plus.md
Implements fn shrink_to_fit for HashMap.
HashMap's `reserve` method now takes as an argument the *extra* space to reserve. [breaking-change]
Removes a FIXME on closed issue #15064. This flag is no longer needed or used since reflection is gone.
In regards to: #19253 (comment) This commit: * Changes the #deriving code so that it generates code that utilizes fewer reexports (in particur Option::* and Result::*), which is necessary to remove those reexports in the future * Changes other areas of the codebase so that fewer reexports are utilized
The same goes for sys::fs::FileDesc::fstat() on Windows. Signed-off-by: NODA, Kai <[email protected]>
On *BSD systems, we can open(2) a directory and directly read(2) from it due to an old tradition. We should avoid doing so by explicitly calling fstat(2) to check the type of the opened file. Opening a directory as a module file can't always be avoided. Even when there's no "path" attribute trick involved, there can always be a *directory* named "my_module.rs". Fix #12460 Signed-off-by: NODA, Kai <[email protected]>
…k unconditionally. This is prompted by some sort of bug in trans that causes a stack overflow when the modules in trans are made private. (In particular, the overflow can also be avoided by making `controlflow` and `callee` public, but that seems strictly worse than just using more stack.)
First half of bootstrapping rust-lang/rfcs#446
Part of enforcing capacity-related conventions, for #18424, the collections reform. Implements `fn shrink_to_fit` for HashMap. The `reserve` method now takes as an argument the *extra* space to reserve.
This continues the work @thestinger started in #18885 (which hasn't landed yet, so wait for that to land before landing this one). Instead of adding more methods to `BufReader`, this just allows a `&[u8]` to be used directly as a `Reader`. It also adds an impl of `Writer` for `&mut [u8]`.
Comparison traits have gained an `Rhs` input parameter that defaults to `Self`. And now the comparison operators can be overloaded to work between different types. In particular, this PR allows the following operations (and their commutative versions): - `&str` == `String` == `CowString` - `&[A]` == `&mut [B]` == `Vec<C>` == `CowVec<D>` == `[E, ..N]` (for `N` up to 32) - `&mut A` == `&B` (for `Sized` `A` and `B`) Where `A`, `B`, `C`, `D`, `E` may be different types that implement `PartialEq`. For example, these comparisons are now valid: `string == "foo"`, and `vec_of_strings == ["Hello", "world"]`. [breaking-change]s Since the `==` may now work on different types, operations that relied on the old "same type restriction" to drive type inference, will need to be type annotated. These are the most common fallout cases: - `some_vec == some_iter.collect()`: `collect` needs to be type annotated: `collect::<Vec<_>>()` - `slice == &[a, b, c]`: RHS doesn't get coerced to an slice, use an array instead `[a, b, c]` - `lhs == []`: Change expression to `lhs.is_empty()` - `lhs == some_generic_function()`: Type annotate the RHS as necessary cc #19148 r? @aturon
On *BSD systems, we can `open(2)` a directory and directly `read(2)` from it due to an old tradition. We should avoid doing so by explicitly calling `fstat(2)` to check the type of the opened file. Opening a directory as a module file can't always be avoided. Even when there's no "path" attribute trick involved, there can always be a *directory* named `my_module.rs`. Incidentally, remove unnecessary mutability of `&self` from `io::fs::File::stat()`.
Now we can use `#[deriving(Clone)]` on structs that contain `Cow`. r? @aturon or anyone else
This has the goal of further reducing peak memory usage and enabling more parallelism. This patch should allow trans/typeck to build in parallel. The plan is to proceed by moving as many additional passes as possible into distinct crates that lay alongside typeck/trans. Basically, the idea is that there is the `rustc` crate which defines the common data structures shared between passes. Individual passes then go into their own crates. Finally, the `rustc_driver` crate knits it all together. cc @jakub-: One wrinkle is the diagnostics plugin. Currently, it assumes all diagnostics are defined and used within one crate in order to track what is used and what is duplicated. I had to disable this. We'll have to find an alternate strategy, but I wasn't sure what was best so decided to just disable the duplicate checking for now.
We don't need this &mut, and vec could use []s
There ain’t an RFC 248, while 438 looks to be what is being referred to: https://github.com/rust-lang/rfcs/blob/master/text/0438-precedence-of-plus.md
Subj., expand_quote_ty produces wrong call to parse_ty now.
In regards to: #19253 (comment) This commit: * Changes the #deriving code so that it generates code that utilizes fewer reexports (in particur Option::\*, Result::\*, and Ordering::\*), which is necessary to remove those reexports in the future * Changes other areas of the codebase so that fewer reexports are utilized
The only other place I know of that doesn’t allow trailing commas is closure types (#19414), and those are a bit tricky to fix (I suspect it might be impossible without infinite lookahead) so I didn’t implement that in this patch. There are other issues surrounding closure type parsing anyway, in particular #19410.
Otherwise region inference can fail when closure arguments include `ref` bindings. Test case included in the PR.
Removes a FIXME on closed issue #15064. This flag is no longer needed or used since reflection is gone.
I think that this wording makes it more clear as to what we're doing here. Opinions @steveklabnik ?
Using `and` here instead of `but` sounds better to me, as but makes it sound like an item which is still under active development shouldn't normally require more testing, but this one does - or something like that :-) @steveklabnik?
1. Made small improvements to the docs for checked_sub, checked_mul and checked_div. 2. Updated a confusingly outdated comment for intrinsics, noticed before at <https://stackoverflow.com/questions/23582931/>.
Closes #19469 r?
First half of bootstrapping rust-lang/rfcs#446
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
May 20, 2025
fix: resolve doc path from parent module if outer comments exist on module
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.
No description provided.