Skip to content

Rust's coherence checking overconservative #10601

Closed
@minhnhdo

Description

@minhnhdo

Code:

use std::rand;

pub trait Nothing { }

impl<T: rand::Rand> Nothing for T { }
impl<T: rand::Rand> Nothing for ~[T] { }

Output:

error: conflicting implementations for trait `lib::Nothing`

Expected:
Compile normally, as there is no impl Rand for ~[T].

Metadata

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