| Age | Commit message (Collapse) | Author | Lines |
|
Fix ICE for functions with more than 65535 arguments
This pull request fixes #88577 by changing the `param_idx` field in the `Param` variant of `WellFormedLoc` from `u16` to `u32`, thus allowing for more than 65,535 arguments in a function. Note that I also added a regression test, but needed to add `// ignore-tidy-filelength` because the test is more than 8000 lines long.
|
|
Change more x64 size checks to not apply to x32.
Commit 95e096d6 changed a bunch of size checks already, but more have
been added, so this fixes the new ones the same way: the various size
checks that are conditional on target_arch = "x86_64" were not intended
to apply to x86_64-unknown-linux-gnux32, so add
target_pointer_width = "64" to the conditions.
|
|
Improve error message when _ is used for in/inout asm operands
As suggested by ```@Commeownist``` in https://github.com/rust-lang/rust/issues/72016#issuecomment-903102415.
|
|
Fix non-capturing closure return type coercion
Fixes #88097. For the example given there:
```rust
fn peculiar() -> impl Fn(u8) -> u8 {
return |x| x + 1
}
```
which incorrectly reports an error, I noticed something weird in the debug log:
```
DEBUG rustc_typeck::check::coercion coercion::try_find_coercion_lub([closure@test.rs:2:12: 2:21], [closure@test.rs:2:12: 2:21], exprs=1 exprs)
```
Apparently, `try_find_coercion_lub()` thinks that the LUB for two closure types always has to be a function pointer (which explains the `expected closure, found fn pointer` error in #88097). There is one corner case where that isn't true, though — namely, when the two closure types are equal, in which case the trivial LUB is the type itself. This PR fixes this by inserting an explicit check for type equality in `try_find_coercion_lub()`.
|
|
|
|
|
|
|
|
|
|
- use "with MUSL" style where applicable
- add "hardfloat" suffix for "armv7-unknown-linux-musleabihf"
|
|
r=nagisa
rustc: use more correct span data in for loop desugaring
Fixes #82462
Before:
help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
|
LL | for x in DroppingSlice(&*v).iter(); {
| +
After:
help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
|
LL | };
| +
This seems like a reasonable fix: since the desugared "expr_drop_temps_mut" contains the entire desugared loop construct, its span should contain the entire loop construct as well.
|
|
|
|
Rollup of 15 pull requests
Successful merges:
- #85200 (Ignore derived Clone and Debug implementations during dead code analysis)
- #86165 (Add proc_macro::Span::{before, after}.)
- #87088 (Fix stray notes when the source code is not available)
- #87441 (Emit suggestion when passing byte literal to format macro)
- #88546 (Emit proper errors when on missing closure braces)
- #88578 (fix(rustc): suggest `items` be borrowed in `for i in items[x..]`)
- #88632 (Fix issues with Markdown summary options)
- #88639 (rustdoc: Fix ICE with `doc(hidden)` on tuple variant fields)
- #88667 (Tweak `write_fmt` doc.)
- #88720 (Rustdoc coverage fields count)
- #88732 (RustWrapper: avoid deleted unclear attribute methods)
- #88742 (Fix table in docblocks)
- #88776 (Workaround blink/chromium grid layout limitation of 1000 rows)
- #88807 (Fix typo in docs for iterators)
- #88812 (Fix typo `option` -> `options`.)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
- Cdb now correctly visualizes enums.
- Cdb doesn't render emoji characters in `OSStr` anymore.
- Cdb doesn't always render `str` correctly (#88840)
|
|
|
|
Fixes #88803
|
|
This reverts commit 8059bc1069b88a51ec2dfc2483854b9a854b1994.
|
|
This merges upstream `release/13.x` changes to our fork. In particular,
this includes the bugfix https://reviews.llvm.org/D108608 (see also
https://bugs.llvm.org/show_bug.cgi?id=51637).
|
|
Local variables can never be exported.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Update Miri
Fixes #88768.
r? `@RalfJung`
|
|
Fix typo `option` -> `options`.
|
|
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 https://github.com/rust-lang/rust/issues/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`
|
|
Fix table in docblocks
"Overwrite" of #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.

Thanks `@nbdd0121` for `overflow-x: auto;`. ;)
r? `@notriddle`
|
|
r=Manishearth
Rustdoc coverage fields count
Follow-up of #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`
|
|
rustdoc: Fix ICE with `doc(hidden)` on tuple variant fields
Fixes #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

|
|
Fix issues with Markdown summary options
- Use `summary_opts()` for Markdown summaries
- Enable all main body Markdown options for summaries
|
|
notriddle:notriddle/suggest-add-reference-to-for-loop-iter, r=nagisa
fix(rustc): suggest `items` be borrowed in `for i in items[x..]`
Fixes #87994
|
|
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 #88065.
r? `@estebank`
|
|
Emit suggestion when passing byte literal to format macro
Closes #86865
|
|
|
|
|
|
|
|
|
|
struct fields.
|
|
|
|
They can be obtained by accessing the `TyCtxt` where they are needed.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
This reverts commit 059b68dd677808e14e560802d235ad40beeba71e.
Note that this was manually adjusted to retain some of the refactoring
introduced by commit 059b68dd677808e14e560802d235ad40beeba71e, so that it could
likewise retain the correction introduced in commit
5b4bc05fa57be19bb5962f4b7c0f165e194e3151
|
|
This reverts commit 8a1dd6918bb686a960ad5ced46a16b5b59668464.
|