-
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 15 pull requests #88824
Rollup of 15 pull requests #88824
Commits on Jun 9, 2021
-
Configuration menu - View commit details
-
Copy full SHA for d5aec64 - Browse repository at this point
Copy the full SHA d5aec64View commit details
Commits on Jul 28, 2021
-
Configuration menu - View commit details
-
Copy full SHA for f9be6cd - Browse repository at this point
Copy the full SHA f9be6cdView commit details
Commits on Aug 31, 2021
-
Configuration menu - View commit details
-
Copy full SHA for f56034e - Browse repository at this point
Copy the full SHA f56034eView commit details
Commits on Sep 2, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 733bdd0 - Browse repository at this point
Copy the full SHA 733bdd0View commit details -
Configuration menu - View commit details
-
Copy full SHA for f23003d - Browse repository at this point
Copy the full SHA f23003dView commit details
Commits on Sep 4, 2021
-
Use
summary_opts()
for Markdown summariesIt was accidentally changed to use `opts()` in rust-lang#86451. I also renamed `opts()` to `main_body_opts()` to make this kind of accidental change less likely.
Configuration menu - View commit details
-
Copy full SHA for 208a5fd - Browse repository at this point
Copy the full SHA 208a5fdView commit details -
Enable all main body Markdown options for summaries
This fixes odd renderings when these features are used in the first paragraph of documentation for an item. This is an extension of rust-lang#87270.
Configuration menu - View commit details
-
Copy full SHA for 2cc7b7c - Browse repository at this point
Copy the full SHA 2cc7b7cView commit details
Commits on Sep 5, 2021
-
Previous version wrongly used `but` while the two parts of the sentence are not contradicting but completing with each other.
Configuration menu - View commit details
-
Copy full SHA for bfb2b02 - Browse repository at this point
Copy the full SHA bfb2b02View commit details
Commits on Sep 6, 2021
-
fix ICE on hidden tuple variant fields
this also renders them as `_`, which rustdoc previously did not.
Configuration menu - View commit details
-
Copy full SHA for 4a915ac - Browse repository at this point
Copy the full SHA 4a915acView commit details
Commits on Sep 7, 2021
-
test: add case for mutating iterator
Note that this incorrectly suggests a shared borrow, but at least we know it's happening.
Configuration menu - View commit details
-
Copy full SHA for d6ff916 - Browse repository at this point
Copy the full SHA d6ff916View commit details -
RustWrapper: avoid deleted unclear attribute methods
These were deleted in https://reviews.llvm.org/D108614, and in C++ I definitely see the argument for their removal. I didn't try and propagate the changes up into higher layers of rustc in this change because my initial goal was to get rustc working against LLVM HEAD promptly, but I'm happy to follow up with some refactoring to make the API on the Rust side match the LLVM API more directly (though the way the enum works in Rust makes the API less scary IMO). r? @nagisa cc @nikic
Configuration menu - View commit details
-
Copy full SHA for 532bb80 - Browse repository at this point
Copy the full SHA 532bb80View commit details -
RustWrapper: just use the *AtIndex funcs directly
Otherwise we're kind of reimplementing the inverse of the well-named methods, and that's not a direction we want to go.
Configuration menu - View commit details
-
Copy full SHA for 484b79b - Browse repository at this point
Copy the full SHA 484b79bView commit details
Commits on Sep 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 32188d7 - Browse repository at this point
Copy the full SHA 32188d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 021b8ff - Browse repository at this point
Copy the full SHA 021b8ffView commit details -
RustWrapper: remove some uses of AttrBuilder
Turns out we can also use Attribute::get*() methods here, and avoid the AttrBuilder and an extra helper method here.
Configuration menu - View commit details
-
Copy full SHA for 4d04540 - Browse repository at this point
Copy the full SHA 4d04540View commit details
Commits on Sep 9, 2021
-
Workaround blink/chromium grid layout limitation of 1000 rows
See rust-lang#88545 for more details
Configuration menu - View commit details
-
Copy full SHA for 0bf16af - Browse repository at this point
Copy the full SHA 0bf16afView commit details -
Emit proper errors on missing closure braces
This commit focuses on emitting clean errors for the following syntax error: ``` Some(42).map(|a| dbg!(a); a ); ``` Previous implementation tried to recover after parsing the closure body (the `dbg` expression) by replacing the next `;` with a `,`, which made the next expression belong to the next function argument. As such, the following errors were emitted (among others): - the semicolon token was not expected, - a is not in scope, - Option::map is supposed to take one argument, not two. This commit allows us to gracefully handle this situation by adding giving the parser the ability to remember when it has just parsed a closure body inside a function call. When this happens, we can treat the unexpected `;` specifically and try to parse as much statements as possible in order to eat the whole block. When we can't parse statements anymore, we generate a clean error indicating that the braces are missing, and return an ExprKind::Err.
Sasha Pourcelot committedSep 9, 2021 Configuration menu - View commit details
-
Copy full SHA for b21425d - Browse repository at this point
Copy the full SHA b21425dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 79adda9 - Browse repository at this point
Copy the full SHA 79adda9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57fcb2e - Browse repository at this point
Copy the full SHA 57fcb2eView commit details
Commits on Sep 10, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 81ff53f - Browse repository at this point
Copy the full SHA 81ff53fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d4d3bd - Browse repository at this point
Copy the full SHA 5d4d3bdView commit details -
Don't require documentation for fields in an enum tuple variant or fo…
…r tuple struct fields.
Configuration menu - View commit details
-
Copy full SHA for 64344cc - Browse repository at this point
Copy the full SHA 64344ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for eda4cfb - Browse repository at this point
Copy the full SHA eda4cfbView commit details -
Rollup merge of rust-lang#85200 - FabianWolff:issue-84647, r=nikomats…
…akis Ignore derived Clone and Debug implementations during dead code analysis This pull request fixes rust-lang#84647. Derived implementations of `Clone` and `Debug` always trivially read all fields, so "field is never read" dead code warnings are never triggered. Arguably, though, a user most likely will only be interested in whether _their_ code ever reads those fields, which is the behavior I have implemented here. Note that implementations of `Clone` and `Debug` are only ignored if they are `#[derive(...)]`d; a custom `impl Clone/Debug for ...` will still be analyzed normally (i.e. if a custom `Clone` implementation uses all fields of the struct, this will continue to suppress dead code warnings about unused fields); this seemed like the least intrusive change to me (although it would be easy to change — just drop the `&& [impl_]item.span.in_derive_expansion()` in the if conditions). The only thing that I am slightly unsure about is that in rust-lang#84647, `@matklad` said > Doesn't seem easy to fix though :( However, it _was_ pretty straightforward to fix, so did I perhaps overlook something obvious? `@matklad,` could you weigh in on this?
Configuration menu - View commit details
-
Copy full SHA for acfe7c4 - Browse repository at this point
Copy the full SHA acfe7c4View commit details -
Rollup merge of rust-lang#86165 - m-ou-se:proc-macro-span-shrink, r=d…
…tolnay Add proc_macro::Span::{before, after}. This adds `proc_macro::Span::before()` and `proc_macro::Span::after()` to get a zero width span at the start or end of the span. These are equivalent to rustc's `Span::shrink_to_lo()` and `Span::shrink_to_hi()` but with a less cryptic name. They are useful when generating diagnostlics like "missing \<thing\> after \<thing\>". E.g. ```rust syn::Error::new(ident.span().after(), "missing `:` after field name").into_compile_error() ```
Configuration menu - View commit details
-
Copy full SHA for 000dbd2 - Browse repository at this point
Copy the full SHA 000dbd2View commit details -
Rollup merge of rust-lang#87088 - FabianWolff:issue-87060, r=estebank
Fix stray notes when the source code is not available Fixes rust-lang#87060. To reproduce it with a local build of rustc, you have to copy the compiler (e.g. `build/x86_64-unknown-linux-gnu/stage1/`) somewhere and then rename the compiler source directory (maybe there is a smarter way as well). Then, rustc won't find the standard library sources and report stray notes such as ``` note: deref defined here ``` with no location for "here". Another example I've found is this: ```rust use std::ops::Add; fn foo<T: Add<Output=()>>(x: T) { x + x; } fn main() {} ``` ``` error[E0382]: use of moved value: `x` --> binop.rs:4:9 | 3 | fn foo<T: Add<Output=()>>(x: T) { | - move occurs because `x` has type `T`, which does not implement the `Copy` trait 4 | x + x; | ----^ | | | | | value used here after move | `x` moved due to usage in operator | note: calling this operator moves the left-hand side help: consider further restricting this bound | 3 | fn foo<T: Add<Output=()> + Copy>(x: T) { | ^^^^^^ error: aborting due to previous error ``` where, again, the note is supposed to point somewhere but doesn't. I have fixed this by checking whether the corresponding source code is actually available before emitting the note.
Configuration menu - View commit details
-
Copy full SHA for e422612 - Browse repository at this point
Copy the full SHA e422612View commit details -
Rollup merge of rust-lang#87441 - ibraheemdev:i-86865, r=cjgillot
Emit suggestion when passing byte literal to format macro Closes rust-lang#86865
Configuration menu - View commit details
-
Copy full SHA for 358a018 - Browse repository at this point
Copy the full SHA 358a018View commit details -
Rollup merge of rust-lang#88546 - scrabsha:scrabsha/closure-missing-b…
…races, r=estebank Emit proper errors when on missing closure braces This commit focuses on emitting clean errors for the following syntax error: ``` Some(42).map(|a| dbg!(a); a ); ``` Previous implementation tried to recover after parsing the closure body (the `dbg` expression) by replacing the next `;` with a `,`, which made the next expression belong to the next function argument. As such, the following errors were emitted (among others): - the semicolon token was not expected, - a is not in scope, - Option::map is supposed to take one argument, not two. This commit allows us to gracefully handle this situation by adding giving the parser the ability to remember when it has just parsed a closure body inside a function call. When this happens, we can treat the unexpected `;` specifically and try to parse as much statements as possible in order to eat the whole block. When we can't parse statements anymore, we generate a clean error indicating that the braces are missing, and return an ExprKind::Err. Closes rust-lang#88065. r? `@estebank`
Configuration menu - View commit details
-
Copy full SHA for dc003dd - Browse repository at this point
Copy the full SHA dc003ddView commit details -
Rollup merge of rust-lang#88578 - notriddle:notriddle/suggest-add-ref…
…erence-to-for-loop-iter, r=nagisa fix(rustc): suggest `items` be borrowed in `for i in items[x..]` Fixes rust-lang#87994
Configuration menu - View commit details
-
Copy full SHA for 257f5ad - Browse repository at this point
Copy the full SHA 257f5adView commit details -
Rollup merge of rust-lang#88632 - camelid:md-opts, r=CraftSpider
Fix issues with Markdown summary options - Use `summary_opts()` for Markdown summaries - Enable all main body Markdown options for summaries
Configuration menu - View commit details
-
Copy full SHA for 1043549 - Browse repository at this point
Copy the full SHA 1043549View commit details -
Rollup merge of rust-lang#88639 - Emilgardis:fix-issue-88600, r=Guill…
…aumeGomez rustdoc: Fix ICE with `doc(hidden)` on tuple variant fields Fixes rust-lang#88600. ```rust pub struct H; pub struct S; pub enum FooEnum { HiddenTupleItem(#[doc(hidden)] H), MultipleHidden(#[doc(hidden)] H, #[doc(hidden)] H), MixedHiddenFirst(#[doc(hidden)] H, S), MixedHiddenLast(S, #[doc(hidden)] H), HiddenStruct { #[doc(hidden)] h: H, s: S, }, } ``` Generates ![image](https://user-images.githubusercontent.com/1502855/132259152-382f9517-c2a0-41d8-acd0-64e5993931fc.png)
Configuration menu - View commit details
-
Copy full SHA for 0438048 - Browse repository at this point
Copy the full SHA 0438048View commit details -
Rollup merge of rust-lang#88667 - kraktus:patch-1, r=dtolnay
Tweak `write_fmt` doc. Found this weird sentence while reading the docs.
Configuration menu - View commit details
-
Copy full SHA for 8368af0 - Browse repository at this point
Copy the full SHA 8368af0View commit details -
Rollup merge of rust-lang#88720 - GuillaumeGomez:rustdoc-coverage-fie…
…lds-count, r=Manishearth Rustdoc coverage fields count Follow-up of rust-lang#88688. Instead of requiring enum tuple variant fields and tuple struct fields to be documented, we count them if they are documented, otherwise we don't include them in the count. r? `@Manishearth`
Configuration menu - View commit details
-
Copy full SHA for e0e3d85 - Browse repository at this point
Copy the full SHA e0e3d85View commit details -
Rollup merge of rust-lang#88732 - durin42:llvm-14-attrs-2, r=nikic
RustWrapper: avoid deleted unclear attribute methods These were deleted in https://reviews.llvm.org/D108614, and in C++ I definitely see the argument for their removal. I didn't try and propagate the changes up into higher layers of rustc in this change because my initial goal was to get rustc working against LLVM HEAD promptly, but I'm happy to follow up with some refactoring to make the API on the Rust side match the LLVM API more directly (though the way the enum works in Rust makes the API less scary IMO). r? ``@nagisa`` cc ``@nikic``
Configuration menu - View commit details
-
Copy full SHA for 1c091e4 - Browse repository at this point
Copy the full SHA 1c091e4View commit details -
Rollup merge of rust-lang#88742 - GuillaumeGomez:fix-table-in-docbloc…
…ks, r=nbdd0121 Fix table in docblocks "Overwrite" of rust-lang#88702. Instead of adding a z-index to the sidebar (which only hides the issue, doesn't fix it), I wrap `<table>` elements inside a `<div>` and limit all chidren of `.docblock` elements' width to prevent having the scrollbar on the whole doc block. ![Screenshot from 2021-09-08 15-11-24](https://user-images.githubusercontent.com/3050060/132515740-71796515-e74f-429f-ba98-2596bdbf781c.png) Thanks `@nbdd0121` for `overflow-x: auto;`. ;) r? `@notriddle`
Configuration menu - View commit details
-
Copy full SHA for 130e2e1 - Browse repository at this point
Copy the full SHA 130e2e1View commit details -
Rollup merge of rust-lang#88776 - dns2utf8:rustdoc_workaround_1000_el…
…ements_grid_bug, r=GuillaumeGomez Workaround blink/chromium grid layout limitation of 1000 rows I made this in case we don't come up with a better solution in time. See rust-lang#88545 for more details. A rendered version of the standard library is hosted here: https://data.estada.ch/rustdoc-nightly_497ee321af_2021-09-09/core/arch/arm/index.html r? `@GuillaumeGomez` `@jsha`
Configuration menu - View commit details
-
Copy full SHA for 3aaec55 - Browse repository at this point
Copy the full SHA 3aaec55View commit details -
Rollup merge of rust-lang#88807 - jruderman:which_reverses, r=joshtri…
…plett Fix typo in docs for iterators
Configuration menu - View commit details
-
Copy full SHA for 0055303 - Browse repository at this point
Copy the full SHA 0055303View commit details -
Rollup merge of rust-lang#88812 - gz:patch-1, r=ehuss
Fix typo `option` -> `options`.
Configuration menu - View commit details
-
Copy full SHA for f77311b - Browse repository at this point
Copy the full SHA f77311bView commit details