This PR integrates `compiletest_rs` as suggested in #5646. I created a new `tests/compiletest` directory which contains separate crates for the tests. Currently this PR includes `compile-fail` tests for some lints (acutally all except inheritance_integrity, beacuse I'm not sure how to include the dom stuff in a way the `#[dom_struct]` works). I gathered that there should be more crates for which compiletests make sense and would appreciate any pointers to relevant crates. Source-Repo: https://github.com/servo/servo Source-Revision: d574b78313be75f3388123d11354b897598877a3
17 lines
429 B
Rust
17 lines
429 B
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#![feature(plugin, custom_attribute)]
|
|
#![plugin(plugins)]
|
|
#![allow(dead_code)]
|
|
|
|
#[privatize]
|
|
struct Foo {
|
|
pub v1: i32,
|
|
//~^ ERROR Field v1 is public where only private fields are allowed
|
|
v2: i32
|
|
}
|
|
|
|
fn main() {}
|