Hacker News new | ask | show | jobs
by veber-alex 1422 days ago
> let b:&str = &"str";

This has nothing to do with DST but with type coercion.

The type of `b` is `&&str` but you requested the type to be `&str` which is fine as the compiler can coerce from `&&str` to `&str` in this case.

In the same way you can write

  let b: &i32 = &&&&1;
and it will compile fine