Skip to content
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

Add Option<Span> to require_lang_item #63961

Merged
merged 3 commits into from
Aug 29, 2019

Conversation

JohnTitor
Copy link
Member

Fixes #63954

I'm not sure where to take Some(span) or something so I use None in many places.
r? @estebank

src/librustc_mir/transform/qualify_consts.rs Outdated Show resolved Hide resolved
src/librustc_mir/util/elaborate_drops.rs Outdated Show resolved Hide resolved
src/librustc_typeck/check/cast.rs Show resolved Hide resolved
src/librustc_typeck/check/mod.rs Show resolved Hide resolved
--> $DIR/privacy2.rs:14:14
|
LL | pub fn foo() {}
| ^
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonas-schievink This and privacy3 are expected?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, but yeah it's not a very good error span. Feel free to remove the spans for the Sized lang item, the compiler needs that lang item for all sorts of checks that don't really correspond to any language features.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, okay, it may cause confusing so I'd like to remove their spans.

@JohnTitor JohnTitor added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 28, 2019
@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Aug 28, 2019

📌 Commit ede7a77 has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 28, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 29, 2019
…, r=estebank

Add Option<Span> to `require_lang_item`

Fixes rust-lang#63954

I'm not sure where to take `Some(span)` or something so I use `None` in many places.
r? @estebank
bors added a commit that referenced this pull request Aug 29, 2019
Rollup of 11 pull requests

Successful merges:

 - #63811 (Correctly suggest adding bounds to `impl Trait` argument)
 - #63933 (Resolve some small issues related to #63580)
 - #63938 (or-pattern: fix typo in error message)
 - #63945 (Recover `mut $pat` and other improvements)
 - #63958 (const_prop: only call error_to_const_error if we are actually showing something)
 - #63961 (Add Option<Span> to `require_lang_item`)
 - #63963 (remove the reference to __cxa_thread_atexit_impl)
 - #63965 (Prevent syntax error in LD linker version script)
 - #63968 (rustc_apfloat: make the crate #![no_std] explicitly.)
 - #63970 (Notify me (flip1995) when Clippy toolstate changes)
 - #63980 (add missing `#[repr(C)]` on the Slices union)

Failed merges:

 - #63989 (Add Yaah to clippy toolstain notification list)

r? @ghost
@bors bors merged commit ede7a77 into rust-lang:master Aug 29, 2019
@JohnTitor JohnTitor deleted the improve-require-lang-item branch August 29, 2019 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add optional span to require_lang_item for diagnostics with more context
4 participants