Skip to content

Add Option<Span> to require_lang_item - #63961

Merged
bors merged 3 commits into
rust-lang:masterfrom
JohnTitor:improve-require-lang-item
Aug 29, 2019
Merged

Add Option<Span> to require_lang_item#63961
bors merged 3 commits into
rust-lang:masterfrom
JohnTitor:improve-require-lang-item

Conversation

@JohnTitor

Copy link
Copy Markdown
Member

Fixes #63954

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

Comment thread src/librustc_mir/transform/qualify_consts.rs Outdated
Comment thread src/librustc_mir/util/elaborate_drops.rs Outdated
Comment thread src/librustc_typeck/check/cast.rs Outdated
Comment thread src/librustc_typeck/check/mod.rs Outdated
@JohnTitor
JohnTitor force-pushed the improve-require-lang-item branch from 04222b5 to 8c921be Compare August 27, 2019 22:11
Comment thread src/test/ui/privacy/privacy2.stderr Outdated
--> $DIR/privacy2.rs:14:14
|
LL | pub fn foo() {}
| ^

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

@bors r+

@bors

bors commented Aug 28, 2019

Copy link
Copy Markdown
Collaborator

📌 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