-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not emit empty suggestion #133843
Do not emit empty suggestion #133843
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
r? jieyouxu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I left some comment nits but otherwise this LGTM. You can r=me after addressing those.
compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs
Outdated
Show resolved
Hide resolved
@rustbot author |
The `println!();` statement's span doesn't include the `;`, and the modified suggestions where trying to get the `;` by getting the differenece between the statement's and the expression's spans, which was an empty suggestion. Fix rust-lang#133833, fix rust-lang#133834.
a7cc69e
to
1b449e1
Compare
@bors r=jieyouxu |
Do not emit empty suggestion The `println!();` statement's span doesn't include the `;`, and the modified suggestions where trying to get the `;` by getting the differenece between the statement's and the expression's spans, which was an empty suggestion. Fix rust-lang#133833, fix rust-lang#133834.
Do not emit empty suggestion The `println!();` statement's span doesn't include the `;`, and the modified suggestions where trying to get the `;` by getting the differenece between the statement's and the expression's spans, which was an empty suggestion. Fix rust-lang#133833, fix rust-lang#133834.
Rollup of 7 pull requests Successful merges: - rust-lang#118833 (Add lint against function pointer comparisons) - rust-lang#122161 (Fix suggestion when shorthand `self` has erroneous type) - rust-lang#133233 (Add context to "const in pattern" errors) - rust-lang#133843 (Do not emit empty suggestion) - rust-lang#133863 (Rename `core_pattern_type` and `core_pattern_types` lib feature gates to `pattern_type_macro`) - rust-lang#133872 (No need to create placeholders for GAT args in confirm_object_candidate) - rust-lang#133874 (`fn_sig_for_fn_abi` should return a `ty::FnSig`, no need for a binder) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 7 pull requests Successful merges: - rust-lang#118833 (Add lint against function pointer comparisons) - rust-lang#122161 (Fix suggestion when shorthand `self` has erroneous type) - rust-lang#133233 (Add context to "const in pattern" errors) - rust-lang#133843 (Do not emit empty suggestion) - rust-lang#133863 (Rename `core_pattern_type` and `core_pattern_types` lib feature gates to `pattern_type_macro`) - rust-lang#133872 (No need to create placeholders for GAT args in confirm_object_candidate) - rust-lang#133874 (`fn_sig_for_fn_abi` should return a `ty::FnSig`, no need for a binder) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 10 pull requests Successful merges: - rust-lang#118833 (Add lint against function pointer comparisons) - rust-lang#122161 (Fix suggestion when shorthand `self` has erroneous type) - rust-lang#133233 (Add context to "const in pattern" errors) - rust-lang#133761 (Update books) - rust-lang#133843 (Do not emit empty suggestion) - rust-lang#133863 (Rename `core_pattern_type` and `core_pattern_types` lib feature gates to `pattern_type_macro`) - rust-lang#133872 (No need to create placeholders for GAT args in confirm_object_candidate) - rust-lang#133874 (`fn_sig_for_fn_abi` should return a `ty::FnSig`, no need for a binder) - rust-lang#133890 (Add a new test ui/incoherent-inherent-impls/no-other-unrelated-errors to check E0116 does not cause unrelated errors) - rust-lang#133892 (Revert rust-lang#133817) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#133843 - estebank:empty-semi-sugg, r=jieyouxu Do not emit empty suggestion The `println!();` statement's span doesn't include the `;`, and the modified suggestions where trying to get the `;` by getting the differenece between the statement's and the expression's spans, which was an empty suggestion. Fix rust-lang#133833, fix rust-lang#133834.
The
println!();
statement's span doesn't include the;
, and the modified suggestions where trying to get the;
by getting the differenece between the statement's and the expression's spans, which was an empty suggestion.Fix #133833, fix #133834.