Skip to content

Commit

Permalink
Remove sized spans
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Aug 27, 2019
1 parent 8c921be commit ede7a77
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/cast.rs
Expand Up @@ -649,7 +649,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {

impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
fn type_is_known_to_be_sized_modulo_regions(&self, ty: Ty<'tcx>, span: Span) -> bool {
let lang_item = self.tcx.require_lang_item(lang_items::SizedTraitLangItem, Some(span));
let lang_item = self.tcx.require_lang_item(lang_items::SizedTraitLangItem, None);
traits::type_known_to_meet_bound_modulo_regions(self, self.param_env, ty, lang_item, span)
}
}
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/mod.rs
Expand Up @@ -2622,7 +2622,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
span: Span,
code: traits::ObligationCauseCode<'tcx>)
{
let lang_item = self.tcx.require_lang_item(lang_items::SizedTraitLangItem, Some(span));
let lang_item = self.tcx.require_lang_item(lang_items::SizedTraitLangItem, None);
self.require_type_meets(ty, span, code, lang_item);
}

Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/lang-item-missing.stderr
@@ -1,8 +1,4 @@
error: requires `sized` lang_item
--> $DIR/lang-item-missing.rs:10:50
|
LL | fn start(argc: isize, argv: *const *const u8) -> isize {
| ^^^^^

error: aborting due to previous error

2 changes: 1 addition & 1 deletion src/test/ui/privacy/privacy2.rs
Expand Up @@ -11,7 +11,7 @@ mod bar {
}
}

pub fn foo() {} //~ ERROR: requires `sized` lang_item
pub fn foo() {}

fn test1() {
use bar::foo;
Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/privacy/privacy2.stderr
Expand Up @@ -11,10 +11,6 @@ LL | use bar::glob::foo;
| ^^^

error: requires `sized` lang_item
--> $DIR/privacy2.rs:14:14
|
LL | pub fn foo() {}
| ^

error: aborting due to 3 previous errors

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/privacy/privacy3.rs
Expand Up @@ -8,7 +8,7 @@ mod bar {
pub use self::glob::*;

mod glob {
fn gpriv() {} //~ ERROR: requires `sized` lang_item
fn gpriv() {}
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/test/ui/privacy/privacy3.stderr
Expand Up @@ -5,10 +5,6 @@ LL | use bar::gpriv;
| ^^^^^^^^^^ no `gpriv` in `bar`

error: requires `sized` lang_item
--> $DIR/privacy3.rs:11:20
|
LL | fn gpriv() {}
| ^

error: aborting due to 2 previous errors

Expand Down

0 comments on commit ede7a77

Please sign in to comment.