Skip to content

Commit ede7a77

Browse files
committed
Remove sized spans
1 parent 8c921be commit ede7a77

File tree

7 files changed

+4
-16
lines changed

7 files changed

+4
-16
lines changed

src/librustc_typeck/check/cast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
649649

650650
impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
651651
fn type_is_known_to_be_sized_modulo_regions(&self, ty: Ty<'tcx>, span: Span) -> bool {
652-
let lang_item = self.tcx.require_lang_item(lang_items::SizedTraitLangItem, Some(span));
652+
let lang_item = self.tcx.require_lang_item(lang_items::SizedTraitLangItem, None);
653653
traits::type_known_to_meet_bound_modulo_regions(self, self.param_env, ty, lang_item, span)
654654
}
655655
}

src/librustc_typeck/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2622,7 +2622,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
26222622
span: Span,
26232623
code: traits::ObligationCauseCode<'tcx>)
26242624
{
2625-
let lang_item = self.tcx.require_lang_item(lang_items::SizedTraitLangItem, Some(span));
2625+
let lang_item = self.tcx.require_lang_item(lang_items::SizedTraitLangItem, None);
26262626
self.require_type_meets(ty, span, code, lang_item);
26272627
}
26282628

src/test/ui/lang-item-missing.stderr

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
error: requires `sized` lang_item
2-
--> $DIR/lang-item-missing.rs:10:50
3-
|
4-
LL | fn start(argc: isize, argv: *const *const u8) -> isize {
5-
| ^^^^^
62

73
error: aborting due to previous error
84

src/test/ui/privacy/privacy2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ mod bar {
1111
}
1212
}
1313

14-
pub fn foo() {} //~ ERROR: requires `sized` lang_item
14+
pub fn foo() {}
1515

1616
fn test1() {
1717
use bar::foo;

src/test/ui/privacy/privacy2.stderr

-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ LL | use bar::glob::foo;
1111
| ^^^
1212

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

1915
error: aborting due to 3 previous errors
2016

src/test/ui/privacy/privacy3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod bar {
88
pub use self::glob::*;
99

1010
mod glob {
11-
fn gpriv() {} //~ ERROR: requires `sized` lang_item
11+
fn gpriv() {}
1212
}
1313
}
1414

src/test/ui/privacy/privacy3.stderr

-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ LL | use bar::gpriv;
55
| ^^^^^^^^^^ no `gpriv` in `bar`
66

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

139
error: aborting due to 2 previous errors
1410

0 commit comments

Comments
 (0)