Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove incorrect delay_span_bug #81532

Merged
merged 1 commit into from
Feb 3, 2021
Merged

Commits on Feb 3, 2021

  1. Remove incorrect delay_span_bug

    The following code is supposed to compile
    
    ```rust
    use std::ops::BitOr;
    
    pub trait IntWrapper {
        type InternalStorage;
    }
    
    impl<T> BitOr for dyn IntWrapper<InternalStorage = T>
    where
        Self: Sized,
        T: BitOr + BitOr<Output = T>,
    {
        type Output = Self;
        fn bitor(self, _other: Self) -> Self {
            todo!()
        }
    }
    ```
    
    Before this change it would ICE. In rust-lang#70998 the removed logic was added
    to provide better suggestions, and the `delay_span_bug` guard was added
    to  protect against a potential logic error when returning traits. As it
    happens, there are cases, like the one above, where traits can indeed be
    returned, so valid code was being rejected.
    
    Fix rust-lang#80207.
    estebank committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    ede0a71 View commit details
    Browse the repository at this point in the history