Skip to content

Check types in method signatures #25388

Closed
@arielb1

Description

We don't check that types in method signatures are well-formed, or even when they are Sized. I mean, this compiles:

pub struct U<T: Send+Sync+Copy+::std::fmt::Display>(*const T);

pub trait Trait { }

pub trait OtherTrait {
    fn f(self, u: U<Trait>);
    fn g(self, u: [u8]);
}

impl OtherTrait for () {
    fn f(self, u: U<Trait>) { }
    fn g(self, ref u: [u8]) {}
}

fn main () {}

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions