rollup merge of #22286: nikomatsakis/variance-4b
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs
This commit is contained in:
@@ -252,7 +252,7 @@ use error::Error;
|
||||
use fmt;
|
||||
use isize;
|
||||
use iter::{Iterator, IteratorExt};
|
||||
use marker::Sized;
|
||||
use marker::{PhantomFn, Sized};
|
||||
use mem::transmute;
|
||||
use ops::FnOnce;
|
||||
use option::Option;
|
||||
@@ -433,7 +433,7 @@ pub enum IoErrorKind {
|
||||
}
|
||||
|
||||
/// A trait that lets you add a `detail` to an IoError easily
|
||||
trait UpdateIoError<T> {
|
||||
trait UpdateIoError {
|
||||
/// Returns an IoError with updated description and detail
|
||||
fn update_err<D>(self, desc: &'static str, detail: D) -> Self where
|
||||
D: FnOnce(&IoError) -> String;
|
||||
@@ -446,7 +446,7 @@ trait UpdateIoError<T> {
|
||||
fn update_desc(self, desc: &'static str) -> Self;
|
||||
}
|
||||
|
||||
impl<T> UpdateIoError<T> for IoResult<T> {
|
||||
impl<T> UpdateIoError for IoResult<T> {
|
||||
fn update_err<D>(self, desc: &'static str, detail: D) -> IoResult<T> where
|
||||
D: FnOnce(&IoError) -> String,
|
||||
{
|
||||
@@ -1572,7 +1572,9 @@ pub trait Seek {
|
||||
/// connections.
|
||||
///
|
||||
/// Doing so produces some sort of Acceptor.
|
||||
pub trait Listener<T, A: Acceptor<T>> {
|
||||
pub trait Listener<T, A: Acceptor<T>>
|
||||
: PhantomFn<T,T> // FIXME should be an assoc type anyhow
|
||||
{
|
||||
/// Spin up the listener and start queuing incoming connections
|
||||
///
|
||||
/// # Error
|
||||
|
||||
Reference in New Issue
Block a user