Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/traits/const-traits/variance.rs

14 lines
229 B
Rust
Raw Normal View History

tests: add variance test for const traits Added to demonstrate change in output in following commit. Many more interesting tests change with different output, missing errors, new errors, etc related to this but they all depend on feature flags and are much more complex than this.
2025-02-24 09:49:06 +00:00
#![feature(rustc_attrs, const_trait_impl)]
#![allow(internal_features)]
#![rustc_variance_of_opaques]
#[const_trait]
trait Foo {}
impl const Foo for () {}
fn foo<'a: 'a>() -> impl const Foo {}
hir_analysis: skip self type of host effect preds Like trait predicates, the self type ought to be skipped here.
2025-02-24 09:50:22 +00:00
//~^ ERROR ['a: *]
tests: add variance test for const traits Added to demonstrate change in output in following commit. Many more interesting tests change with different output, missing errors, new errors, etc related to this but they all depend on feature flags and are much more complex than this.
2025-02-24 09:49:06 +00:00
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 535ms Template: 4ms
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