| Age | Commit message (Collapse) | Author | Lines |
|
Any documentation comments that contain raw-string-looking sequences may pretty-print invalid code when expanding them, as the current logic always uses the `r"literal"` form, without appending any `#`s.
This commit calculates the minimum number of `#`s required to wrap a comment correctly and appends `#`s appropriately.
Fixes #27489.
|
|
Pretty printing of macro with braces but without terminated semicolon
removed more boxes from stack than it put there, resulting in panic.
This fixes the issue #30731.
|
|
|
|
|
|
r? @nrc
|
|
With this PR we can save-analysis on code with errors, essential foundation work for IDE support.
|
|
|
|
r? @nrc
|
|
|
|
|
|
Fixes #31207
by removing abort_if_new_errors
|
|
|
|
|
|
This fixes #31238.
r? @michaelsproul
|
|
|
|
|
|
This allows to render multiple spans on one line, or to splice multiple replacements into a code suggestion.
fixes #28124
|
|
Rustdoc could trigger a code path that relied on the
$CFG_COMPILER_HOST_TRIPLE environment variable being
set, causing an ICE if it was not. This fixes that,
emitting an error instead of crashing.
|
|
This allows to render multiple spans on one line,
or to splice multiple replacements into a code suggestion.
|
|
Pretty printing of macro with braces but without terminated semicolon
removed more boxes from stack than it put there, resulting in panic.
This fixes the issue #30731.
|
|
|
|
|
|
This is a work in progress PR that potentially should fix #29084, #28308, #25385, #28288, #31011. I think this may also adresse parts of #2887.
The problem in this issues seems to be that when transcribing macro arguments, we just clone the argument Nonterminal, which still has to original spans. This leads to the unprintable spans. One solution would be to update the spans of the inserted argument to match the argument in the macro definition. So for [this testcase](https://github.com/rust-lang/rust/compare/master...fhahn:macro-ice?expand=1#diff-f7def7420c51621640707b6337726876R2) the error message would be displayed in the macro definition:
src/test/compile-fail/issue-31011.rs:4:12: 4:22 error: attempted access of field `trace` on type `&T`, but no field with that name was found
src/test/compile-fail/issue-31011.rs:4 if $ctx.trace {
Currently I've added a very simple `update_span` function, which updates the span of the outer-most expression of a `NtExpr`, but this `update_span` function should be updated to handle all Nonterminals. But I'm pretty new to the macro system and would like to check if this approach makes sense, before doing that.
|
|
|
|
|
|
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.
Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
|
|
The deny(warnings) attribute is now enabled for tests so we need to weed out
these warnings as well.
|
|
r? @eddyb or @nrc
|
|
|
|
|
|
Fixes #31073
r? @eddyb
|
|
|
|
|
|
closes #29084
closes #28308
closes #25385
closes #28288
closes #31011
closes #26480
closes #26093
closes #26094
closes #25386
closes #26237
closes #25793
|
|
|
|
|
|
cc #31135 rust-lang/rfcs#1462 #30923 @retep998
r? @pnkfelix
|
|
This PR adds some minor error correction to the parser - if there is a missing ident, we recover and carry on. It also makes compilation more robust so that non-fatal errors (which is still most of them, unfortunately) in parsing do not cause us to abort compilation. The effect is that a program with a missing or incorrect ident can get all the way to type checking.
|
|
|
|
error, by moving unexpected let check into the proper if-else clause
|
|
|
|
|
|
in parse_bottom_expr (parser.rs)
|
|
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.
Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
|
|
Following RFC 1462 (amending 550). Closes #31135.
|
|
format_args! and derive to maintain compatability
|
|
|
|
|
|
The protocol for `serialize::{En,De}code` doesn't allow for two
integers to be serialized next to each other. This switches the
protocol to serializing `Span`s as a struct. rbml structs don't
have any overhead, so the metadata shouldn't increase in size,
but it allows the json format to be properly generated, albeit
slightly more heavy than when it was just serializing a span as
a u64.
Closes #31025.
s
|
|
Any documentation comments that contain raw-string-looking sequences may
pretty-print invalid code when expanding them, as the current logic
always uses the `r"literal"` form, without appending any `#`s.
This commit calculates the minimum number of `#`s required to wrap a
comment correctly and appends `#`s appropriately.
Fixes #27489.
|