Michael Goulet
928388bad2
Make fatal DiagnosticBuilder yield never
2022-03-27 22:25:32 -07:00
Camille GILLOT
0b49d05ea3
Filter OnceNote in diagnostic infra.
2022-03-20 20:36:26 +01:00
Camille GILLOT
056951d628
Take &mut Diagnostic in emit_diagnostic.
...
Taking a Diagnostic by move would break the usual pattern
`diag.label(..).emit()`.
2022-03-20 20:36:08 +01:00
mark
bb8d4307eb
rustc_error: make ErrorReported impossible to construct
...
There are a few places were we have to construct it, though, and a few
places that are more invasive to change. To do this, we create a
constructor with a long obvious name.
2022-03-16 10:35:24 -05:00
Michael Howell
fbd4cfa0f8
diagnostics: only talk about Cargo.toml if running under Cargo
...
Fixes #94646
2022-03-07 10:54:17 -07:00
mark
e489a94dee
rename ErrorReported -> ErrorGuaranteed
2022-03-02 09:45:25 -06:00
Eduard-Mihai Burtescu
b7e95dee65
rustc_errors: let DiagnosticBuilder::emit return a "guarantee of emission".
2022-02-23 06:38:52 +00:00
Eduard-Mihai Burtescu
0b9d70cf6d
rustc_errors: take self by value in DiagnosticBuilder::cancel.
2022-02-23 06:08:06 +00:00
Eduard-Mihai Burtescu
02ff9e0aef
Replace &mut DiagnosticBuilder, in signatures, with &mut Diagnostic.
2022-02-23 05:38:19 +00:00
Eduard-Mihai Burtescu
f24ff1815f
rustc_errors: add downgrade_to_delayed_bug to Diagnostic itself.
2022-02-23 03:46:51 +00:00
Eduard-Mihai Burtescu
a8dfa3757c
rustc_errors: only box the diagnostic field in DiagnosticBuilder.
2022-01-24 11:23:14 +00:00
Eduard-Mihai Burtescu
68fa81baa3
rustc_errors: remove allow_suggestions from DiagnosticBuilder.
2022-01-24 10:49:10 +00:00
bors
9bb77da74d
Auto merge of #87915 - estebank:fancy-spans, r=oli-obk
...
Use smaller spans for some structured suggestions
Use more accurate suggestion spans for
* argument parse error
* fully qualified path
* missing code block type
* numeric casts
2021-09-13 16:31:12 +00:00
yukang
ca27f03ca8
Fix #88256 , remove duplicated diagnostic
2021-09-04 19:26:25 +08:00
Esteban Kuber
34d19634f5
Use smaller spans for some structured suggestions
...
Use more accurate suggestion spans for
* argument parse error
* fully qualified path
* missing code block type
* numeric casts
* E0212
2021-08-12 09:52:38 +00:00
Esteban Küber
0b8f192cfe
Use multispan suggestions more often
...
* Use more accurate span for `async move` suggestion
* Use more accurate span for deref suggestion
* Use `multipart_suggestion` more often
2021-07-30 09:26:31 -07:00
Joshua Nelson
0a351abf83
Document compiler/ with -Aprivate-intra-doc-links
...
Since compiler/ always passes --document-private-items, it's ok to link
to items that are private.
2021-04-05 08:38:09 -04:00
Joshua Nelson
230e396a76
Fix compiler docs
2021-03-27 22:16:34 -04:00
Joshua Nelson
441dc3640a
Remove (lots of) dead code
...
Found with https://github.com/est31/warnalyzer .
Dubious changes:
- Is anyone else using rustc_apfloat? I feel weird completely deleting
x87 support.
- Maybe some of the dead code in rustc_data_structures, in case someone
wants to use it in the future?
- Don't change rustc_serialize
I plan to scrap most of the json module in the near future (see
https://github.com/rust-lang/compiler-team/issues/418 ) and fixing the
tests needed more work than I expected.
TODO: check if any of the comments on the deleted code should be kept.
2021-03-27 22:16:33 -04:00
Joshua Nelson
785aeac521
Remove unused DiagnosticBuilder::sub function
...
`Diagnostic::sub` is only ever used directly; it doesn't need to be
included in the builder.
2021-03-27 22:16:33 -04:00
Joshua Nelson
bb7c04ae9c
Remove unnecessary forward_inner_docs hack
...
and replace it with `extended_key_value_attributes` feature.
2021-03-17 09:52:45 -04:00
Mark Rousskov
d5b760ba62
Bump rustfmt version
...
Also switches on formatting of the mir build module
2021-02-02 09:09:52 -05:00
Aaron Hill
dea8a16af5
Avoid describing a method as 'not found' when bounds are unsatisfied
...
Fixes #76267
When there is a single applicable method candidate, but its trait bounds
are not satisfied, we avoid saying that the method is "not found".
Insted, we update the error message to directly mention which bounds are
not satisfied, rather than mentioning them in a note.
2021-01-26 23:59:50 -05:00
Camelid
10487cd784
Fix typo in method name
...
unsuccessfull -> unsuccessful
2020-12-16 14:59:12 -08:00
Camelid
60b4082d5f
Add more documentation to Diagnostic and DiagnosticBuilder
2020-12-16 14:59:11 -08:00
Andy Russell
a78966df83
clarify span_label documentation
2020-11-16 18:05:45 -05:00
Aaron Hill
23018a55d9
Implement rustc side of report-future-incompat
2020-10-30 20:02:14 -04:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00