]> git.lizzy.rs Git - rust.git/blob - src/test/ui/noexporttypeexe.rs
Rollup merge of #93112 - pietroalbini:pa-cve-2022-21658-nightly, r=pietroalbini
[rust.git] / src / test / ui / noexporttypeexe.rs
1 // aux-build:noexporttypelib.rs
2
3 extern crate noexporttypelib;
4
5 fn main() {
6     // Here, the type returned by foo() is not exported.
7     // This used to cause internal errors when serializing
8     // because the def_id associated with the type was
9     // not convertible to a path.
10   let x: isize = noexporttypelib::foo();
11     //~^ ERROR mismatched types
12     //~| expected type `isize`
13     //~| found enum `Option<isize>`
14     //~| expected `isize`, found enum `Option`
15 }