-
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 10 pull requests #80084
Closed
Closed
Rollup of 10 pull requests #80084
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
functions that does allocations
This will make rustdoc behave properly when -Dwarnings is given
…r=jyn514 Declare a new lint to properly deny warnings in rustdoc This declares a new lint: `INVALID_RUST_CODEBLOCK` that is used by `rustdoc` to properly follow `-D warnings` instead of unconditionally emitting a warning. ## Todo List - [x] Declare lint. - [x] Document lint (file: `src/doc/rustdoc/src/lints.md`). - [x] Use lint in `rustdoc` (file: `src/librustdoc/passes/check_code_block_syntax.rs`, maybe others). - [x] Write tests. - [x] Note: one for the behaviour of the new lint when the error is in a dependency, not the crate being tested (rust-lang#79816 (comment)) - [x] Refactor things. ## Questions - How/where are lints tested ? - Where are lints for `rustdoc` tested ? Fix rust-lang#79792. ``@rustbot`` label T-rustdoc A-lint
Remove memoization leftovers from constant evaluation machine Closes rust-lang#79667
Fix issue rust-lang#78496 EarlyOtherwiseBranch finds MIR structures like: ``` bb0: { ... _2 = discriminant(X) ... switchInt(_2) -> [1_isize: bb1, otherwise: bb3] } bb1: { ... _3 = discriminant(Y) ... switchInt(_3) -> [1_isize: bb2, otherwise: bb3] } bb2: {...} bb3: {...} ``` And transforms them into something like: ``` bb0: { ... _2 = discriminant(X) _3 = discriminant(Y) _4 = Eq(_2, _3) switchInt(_4) -> [true: bb4, otherwise: bb3] } bb2: {...} // unchanged bb3: {...} // unchanged bb4: { switchInt(_2) -> [1_isize: bb2, otherwise: bb3] } ``` But that is not always a safe thing to do -- sometimes the early `otherwise` branch is necessary so the later block could assume the value of `discriminant(X)`. I am not totally sure what's the best way to detect that, but fixing rust-lang#78496 should be easy -- we just check if `X` is a sub-expression of `Y`. A more precise test might be to check if `Y` contains a `Downcast(1)` of `X`, but I think this might be good enough. Fix rust-lang#78496
…ikomatsakis Move binder for dyn to each list item This essentially changes `ty::Binder<&'tcx List<ExistentialTraitRef>>` to `&'tcx List<ty::Binder<ExistentialTraitRef>>`. This is a first step in moving the `dyn Trait` representation closer to Chalk, which we've talked about in `````@rust-lang/wg-traits.````` r? `````@nikomatsakis`````
…on-panic, r=dtolnay Fix overflow when converting ZST Vec to VecDeque ```rust let v = vec![(); 100]; let queue = VecDeque::from(v); println!("{:?}", queue); ``` This code will currently panic with a capacity overflow. This PR resolves this issue and makes the code run fine. Resolves rust-lang#78532
…ulacrum BTreeMap: more expressive local variables in merge r? `````@Mark-Simulacrum`````
…ulacrum BTreeSet: simplify implementation of pop_first/pop_last …and stop it interfering in rust-lang#79245. r? `````@Mark-Simulacrum`````
…Mark-Simulacrum expand-yaml-anchors: Make the output directory separator-insensitive Fixes rust-lang#75709
Optimization for bool's PartialOrd impl Fix rust-lang#80034.
…=matthewjasper Remove unused `TyEncoder::tcx` required method Unsure if this is helpful or not... r? `@ghost` cc `@matthewjasper` `@jackh726`
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:
TyEncoder::tcx
required method #80039 (Remove unusedTyEncoder::tcx
required method)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup