Skip to content

Make inline suggestions no longer be the default#127282

Draft
estebank wants to merge 1 commit intorust-lang:mainfrom
estebank:experiment-for-annotate-snippets
Draft

Make inline suggestions no longer be the default#127282
estebank wants to merge 1 commit intorust-lang:mainfrom
estebank:experiment-for-annotate-snippets

Conversation

@estebank
Copy link
Contributor

@estebank estebank commented Jul 3, 2024

Make the default suggestions show the full patch output instead of trying to render inline.

Before

error: almost complete ascii range
  --> tests/ui/almost_complete_range.rs:17:17
   |
LL |         let _ = ('a') ..'z';
   |                 ^^^^^^--^^^
   |                       |
   |                       help: use an inclusive range: `..=`
   |
   = note: `-D clippy::almost-complete-range` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::almost_complete_range)]`

After

error: almost complete ascii range
  --> tests/ui/almost_complete_range.rs:17:17
   |
LL |         let _ = ('a') ..'z';
   |                 ^^^^^^^^^^^
   |
   = note: `-D clippy::almost-complete-range` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::almost_complete_range)]`
help: use an inclusive range
   |
LL |         let _ = ('a') ..='z';
   |                       ~~~

The inline suggestions output has worse readability than the "verbose" output, and it also (as evidenced in the diff of this PR) tends to hide when the suggestion span is slightly off. Backing off of the inline suggestions will also make it easier to migrate to annotate-snippets, as it will be one fewer special case to handle.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants