Vadim Petrochenkov
e7c42f0cf0
Tiny cleanup to size assertions
2019-11-11 22:23:25 +03:00
Mazdak Farrokhzad
3667e6248e
move PResult to librustc_errors
2019-11-07 13:58:36 +01:00
Mazdak Farrokhzad
4f9651b854
Rollup merge of #66139 - euclio:pluralize, r=nagisa
...
use American spelling for `pluralize!`
2019-11-06 07:03:14 +01:00
Andy Russell
ad550b8ef3
use American spelling for pluralize!
2019-11-05 15:10:24 -05:00
Andy Russell
d06a4ded13
use silent emitter for rustdoc highlighting pass
2019-11-03 22:19:34 -05:00
bors
8b07292671
Auto merge of #65827 - AnthonyMikh:out_of_the_loop, r=estebank
...
Remove a loop which runs exactly once
Though the code seems to work properly, it is worth removing the loop entirely in order to not confuse the reader.
r? @estebank
2019-11-03 11:51:44 +00:00
bors
aa51f04073
Auto merge of #65779 - kevgrasso:E0308highlight, r=estebank
...
Highlight only relevant parts of type path in type errors
Resolves #57413 .
Unfortunately the current Rust UI testing setup can't test that the correct colors are being used in a given output, so here's a screenshot of a small test program I wrote:

2019-11-03 08:01:29 +00:00
Tyler Mandry
7297cd8d92
Rollup merge of #65470 - traxys:fix_65401, r=michaelwoerister
...
Don't hide ICEs from previous incremental compiles
I think this fixes #65401 , the compiler does not fail to ICE after the first compilation, tested on the last snippet of [this comment](https://github.com/rust-lang/rust/issues/63154#issuecomment-541592381 ).
I am not very sure of the fix as I don't understand much of the structure of the compiler.
2019-11-01 11:20:09 -07:00
AnthonyMikh
159d8a4154
Remove a loop which runs exactly once
2019-10-27 12:02:34 +03:00
Esteban Küber
508d032647
review comment: deduplicate logic
2019-10-24 15:44:43 -07:00
Esteban Küber
0baf61bfdb
Increase spacing for suggestions in diagnostics
...
Make the spacing between the code snippet and verbose structured
suggestions consistent with note and help messages.
2019-10-24 12:26:01 -07:00
Kevyn Grasso
fedefeca6d
debug messages added
2019-10-23 12:42:45 -04:00
bors
4a8c5b20c7
Auto merge of #57545 - bovinebuddha:object_safe_for_dispatch, r=nikomatsakis
...
Object safe for dispatch
cc #43561
2019-10-23 13:34:27 +00:00
Mathias Blikstad
ef5acdeceb
RFC 2027: "first draft" of implementation
...
These are a squashed series of commits.
2019-10-22 15:24:33 -04:00
varkor
f042687959
Fix plural mistake in emitter.rs
2019-10-19 18:08:54 +01:00
Quentin Boyer
5930551f6a
Check if there are any delayed_span_bugs and abort incremental compilation in this case
2019-10-16 13:13:13 +02:00
Philipp Hansch
6c75e81561
Refactor: Rename db locals to diag
...
https://github.com/rust-lang/rust/pull/64272 replaced
`DiagnosticBuilder` with `Diagnostic` in some places. This commit just
renames the DB variable from `db` to `diag` where it wasn't renamed.
2019-10-15 08:19:43 +02:00
Esteban Küber
8bf6d35377
Tweak heuristics for less noise
2019-10-14 14:48:45 -07:00
Esteban Küber
6dd718ca79
Use heuristics for capitalization warning in suggestions
2019-10-14 14:32:10 -07:00
Esteban Küber
4bb771615e
Bring attention to suggestions when the only difference is capitalization
2019-10-13 21:48:39 -07:00
Mazdak Farrokhzad
153d3c3ea7
Rollup merge of #65120 - AnthonyMikh:fix_65119, r=estebank
...
Correctly estimate the required space for string in `StyledBuffer::prepend`
Fix #65119
r? @estebank
2019-10-08 15:45:28 +02:00
Tyler Mandry
c7d7e3730a
Rollup merge of #64909 - estebank:turbofish-reloaded, r=Centril
...
When encountering chained operators use heuristics to recover from bad turbofish
2019-10-05 21:54:52 -07:00
AnthonyMikh
4414068cc4
Correctly estimate required space for string
...
`.len()` returns length in bytes so it overestimates the required space
2019-10-05 03:08:05 +03:00
Esteban Küber
76456e7406
review comments
2019-10-03 19:32:56 -07:00
Esteban Küber
02f57f83a9
review comments
2019-10-03 13:22:18 -07:00
AnthonyMikh
df203a297f
Compare primary with value instead of dropping it
2019-10-02 19:48:21 +03:00
AnthonyMikh
bd7cd80299
Fully clear HandlerInner in Handler::reset_err_count
2019-10-02 04:13:02 +03:00
AnthonyMikh
50c2a58d08
Fix borrowck errors
...
Reborrowing doesn't work for loops
2019-10-01 03:22:07 +03:00
AnthonyMikh
fdce4168fc
Hint type for .sum()
2019-10-01 03:04:01 +03:00
AnthonyMikh
515262cc13
Ascript type explicitly
2019-10-01 02:53:44 +03:00
AnthonyMikh
61bc38ecaa
Fix errors
2019-10-01 02:38:35 +03:00
AnthonyMikh
e5db5b34d7
(fmt) remove trailing whitespaces
2019-10-01 02:30:52 +03:00
AnthonyMikh
bb442881fc
Use pattern matching instead of indexing tuples
2019-10-01 01:12:36 +03:00
AnthonyMikh
55b54285c8
Simplify a conditional in collect_annotations
...
Also avoid excessive cloning
2019-10-01 01:08:51 +03:00
AnthonyMikh
9d73176978
Remove redundant .iter_mut()
2019-10-01 00:10:23 +03:00
AnthonyMikh
7a807c5b14
Simplify EmitterWriter::emit_suggestion_default
...
Make function return early if source map is not present
2019-10-01 00:01:22 +03:00
AnthonyMikh
21724eda05
Update doc comment for style_or_override
2019-09-30 23:50:58 +03:00
AnthonyMikh
7b4c5c62aa
Simplify EmitterWriter::get_max_line_num
2019-09-30 23:47:51 +03:00
AnthonyMikh
6b6a79b190
Simplify EmitterWriter::get_multispan_max_line_num
2019-09-30 23:43:24 +03:00
AnthonyMikh
7dc953b493
Simplify code for special case of annotation
2019-09-30 23:33:17 +03:00
AnthonyMikh
75a7c27a54
Revert "Simplify Unicode-aware trimming"
...
`taken` is actually used afterwards
2019-09-27 00:58:18 +03:00
AnthonyMikh
7a0725fdaf
Simplify style_or_override
2019-09-26 00:42:55 +03:00
AnthonyMikh
ea32862503
Use sort_by_key rather than sort_by
2019-09-26 00:38:36 +03:00
AnthonyMikh
f93827f9e4
Simplify Emitter::fix_multispan_in_std_macros
...
1. Rewrite `if let` into `match` to return earl and avoid indenting giant block
2. Assign `spans_updated` only once
2019-09-26 00:31:16 +03:00
AnthonyMikh
9b447e2f9f
Unify order of variables in chained comparison
2019-09-25 23:46:33 +03:00
AnthonyMikh
aef169b4e6
Use Option::map_or where applicable
2019-09-25 23:41:27 +03:00
AnthonyMikh
d6327e8f12
Use map + sum instead of fold for computing Unicode width
2019-09-25 23:23:19 +03:00
AnthonyMikh
4fc5650d17
Simplify Unicode-aware trimming
2019-09-25 23:13:19 +03:00
AnthonyMikh
e9a93be53a
Use max instead of ifs
2019-09-25 23:08:09 +03:00
AnthonyMikh
2cb460e625
Use saturating_sub where applicable
2019-09-25 22:55:04 +03:00