Remove sized
spans
This commit is contained in:
parent
8c921beebb
commit
ede7a777c0
@ -649,7 +649,7 @@ fn try_coercion_cast(&self, fcx: &FnCtxt<'a, 'tcx>) -> bool {
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
@ -2622,7 +2622,7 @@ pub fn require_type_is_sized(&self,
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -11,7 +11,7 @@ pub mod glob {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn foo() {} //~ ERROR: requires `sized` lang_item
|
||||
pub fn foo() {}
|
||||
|
||||
fn test1() {
|
||||
use bar::foo;
|
||||
|
@ -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
|
||||
|
||||
|
@ -8,7 +8,7 @@ mod bar {
|
||||
pub use self::glob::*;
|
||||
|
||||
mod glob {
|
||||
fn gpriv() {} //~ ERROR: requires `sized` lang_item
|
||||
fn gpriv() {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user