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

rustfmt erases dyn* #102431

Closed
eholk opened this issue Sep 28, 2022 · 3 comments
Closed

rustfmt erases dyn* #102431

eholk opened this issue Sep 28, 2022 · 3 comments
Labels
F-dyn_star `#![feature(dyn_star)]`

Comments

@eholk
Copy link
Contributor

eholk commented Sep 28, 2022

While filing #102427, I noticed rustfmt erases dyn* from types.

Input:

#![feature(dyn_star)]
#![allow(incomplete_features)]

use std::fmt::Display;

fn make_dyn_star() -> dyn* Display {
    Box::new(42) as dyn* Display
}

fn main() {
    let x = make_dyn_star();

    println!("{x}");
}

Output:

#![feature(dyn_star)]
#![allow(incomplete_features)]

use std::fmt::Display;

fn make_dyn_star() -> Display {
    Box::new(42) as Display
}

fn main() {
    let x = make_dyn_star();

    println!("{x}");
}

Expected: The input should not have changed because it was already formatted correctly.

@eholk eholk added the F-dyn_star `#![feature(dyn_star)]` label Sep 28, 2022
@mejrs
Copy link
Contributor

mejrs commented Sep 28, 2022

See also rust-lang/rustfmt#5542

@calebcartwright
Copy link
Member

Let's close this. We do not use this repository to track work for rustfmt, similar to many of the other dev tools

@eholk
Copy link
Contributor Author

eholk commented Sep 29, 2022

Sounds good!

@eholk eholk closed this as completed Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-dyn_star `#![feature(dyn_star)]`
Projects
None yet
Development

No branches or pull requests

3 participants