| Age | Commit message (Collapse) | Author | Lines |
|
Do not complain about non-existing fields after parse recovery
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
Fix #57361.
|
|
Add const generics to rustdoc
Split out from #53645. This work is a collaborative effort with @yodaldevoid.
The `FIXME`s are waiting on a refactor to `LazyConst`. I'll address these in a follow up, but I thought it would be better to implement the rest now to avoid bitrot.
r? @QuietMisdreavus
|
|
Recover from missing comma between enum variants and from bad `pub` kw
Fix #56579. Fix #56473.
|
|
|
|
|
|
Be more discerning on when to attempt suggesting a comma in a macro invocation
Fix #58796.
|
|
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
|
|
Adds help message in error for invalid `impl for T` syntax
Fixes #56031.
|
|
When failing to parse struct-like enum variants, the ADT gets recorded
as having no fields. Record that we have actually recovered during
parsing of this variant to avoid complaing about non-existing fields
when actually using it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove methods `Attribute::span` and `MetaItem::span` duplicating public fields
|
|
|
|
|
|
Tweak some error wording
|
|
|
|
Add `-Z allow_features=...` flag
Adds a compiler option to allow only whitelisted features.
For projects on nightly that want to prevent feature-creep (and maybe, someday, move off of nightly). Not being able to enforce this has been a problem on Fuchsia and at other big companies.
This doesn't support filtering edition feature flags, but someone is welcome to add that if they need it.
|
|
add suggestions to invalid macro item error
r? @estebank
|
|
|
|
When the parser has to recover from malformed code in a pattern, do not
complain about missing fields.
|
|
|
|
|
|
|
|
Parse lifetimes that start with a number and give specific error
Fix #58786.
|
|
|
|
|
|
|
|
|
|
Fix fallout from #57667
|
|
|
|
Expose new_sub_parser_from_file
This function is useful when external tools like rustfmt want to parse
internal files without parsing a whole crate.
cc https://github.com/rust-lang/rustfmt/issues/3427.
|
|
Mention `unwind(aborts)` in diagnostics for `#[unwind]`
Simplify input validation for `#[unwind]`, add tests
cc https://github.com/rust-lang/rust/issues/58760
r? @Mark-Simulacrum
|
|
This function is useful when external tools like rustfmt want to parse
internal files without parsing a whole crate.
|
|
|
|
|
|
Rollup of 24 pull requests
Successful merges:
- #58080 (Add FreeBSD armv6 and armv7 targets)
- #58204 (On return type `impl Trait` for block with no expr point at last semi)
- #58269 (Add librustc and libsyntax to rust-src distribution.)
- #58369 (Make the Entry API of HashMap<K, V> Sync and Send)
- #58861 (Expand where negative supertrait specific error is shown)
- #58877 (Suggest removal of `&` when borrowing macro and appropriate)
- #58883 (Suggest appropriate code for unused field when destructuring pattern)
- #58891 (Remove stray ` in the docs for the FromIterator implementation for Option)
- #58893 (race condition in thread local storage example)
- #58906 (Monomorphize generator field types for debuginfo)
- #58911 (Regression test for #58435.)
- #58912 (Regression test for #58813)
- #58916 (Fix release note problems noticed after merging.)
- #58918 (Regression test added for an async ICE.)
- #58921 (Add an explicit test for issue #50582)
- #58926 (Make the lifetime parameters of tcx consistent.)
- #58931 (Elide invalid method receiver error when it contains TyErr)
- #58940 (Remove JSBackend from config.toml)
- #58950 (Add self to mailmap)
- #58961 (On incorrect cfg literal/identifier, point at the right span)
- #58963 (libstd: implement Error::source for io::Error)
- #58970 (delay_span_bug in wfcheck's ty.lift_to_tcx unwrap)
- #58984 (Teach `-Z treat-err-as-bug` to take a number of errors to emit)
- #59007 (Add a test for invalid const arguments)
Failed merges:
- #58959 (Add release notes for PR #56243)
r? @ghost
|
|
|
|
Teach `-Z treat-err-as-bug` to take a number of errors to emit
`-Z treat-err-as-bug` will cause `rustc` to panic after the first error is reported, like previously. `-Z treat-err-as-bug=2` will cause `rustc` to panic after 2 errors have been reported.
Fix #58983.
|
|
On incorrect cfg literal/identifier, point at the right span
CC #58462
|
|
Expand where negative supertrait specific error is shown
Fix #58857.
r? @petrochenkov
|
|
|
|
|
|
|
|
`-Z treat-err-as-bug=0` will cause `rustc` to panic after the first
error is reported. `-Z treat-err-as-bug=2` will cause `rustc` to
panic after 3 errors have been reported.
|
|
|
|
|