Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/dyn-star/error.rs

14 lines
229 B
Rust
Raw Normal View History

Update feature flags on dyn-star tests
2022-08-29 12:02:03 -07:00
#![feature(dyn_star)]
Address code review comments
2022-08-30 12:44:00 -07:00
#![allow(incomplete_features)]
Typecheck dyn* coercions Also changes things to treat dyn* as a sized type, unlike dyn Trait.
2022-04-13 16:38:16 -07:00
use std::fmt::Debug;
trait Foo {}
fn make_dyn_star() {
Implement `PointerLike` for `isize`, `NonNull`, `Cell`, `UnsafeCell`, and `SyncUnsafeCell`. Implementing `PointerLike` for `UnsafeCell` enables the possibility of interior mutable `dyn*` values. Since this means potentially exercising new codegen behavior, I added a test for it in `tests/ui/dyn-star/cell.rs`. Also updated UI tests to account for the `isize` implementation changing error messages.
2024-12-21 17:13:52 -08:00
let i = 42usize;
Make PointerLike opt-in as a trait
2024-11-20 02:46:56 +00:00
let dyn_i: dyn* Foo = i; //~ ERROR trait bound `usize: Foo` is not satisfied
Typecheck dyn* coercions Also changes things to treat dyn* as a sized type, unlike dyn Trait.
2022-04-13 16:38:16 -07:00
}
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1383ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API