Vendor dependencies
Let's see how I like this workflow.
This commit is contained in:
parent
34d1830413
commit
9c435dc440
7500 changed files with 1665121 additions and 99 deletions
8
vendor/anyhow/tests/ui/chained-comparison.rs
vendored
Normal file
8
vendor/anyhow/tests/ui/chained-comparison.rs
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
use anyhow::{ensure, Result};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
// `ensure!` must not partition this into `(false) == (false == true)`
|
||||
// because Rust doesn't ordinarily allow this form of expression.
|
||||
ensure!(false == false == true);
|
||||
Ok(())
|
||||
}
|
||||
10
vendor/anyhow/tests/ui/chained-comparison.stderr
vendored
Normal file
10
vendor/anyhow/tests/ui/chained-comparison.stderr
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
error: comparison operators cannot be chained
|
||||
--> tests/ui/chained-comparison.rs:6:19
|
||||
|
|
||||
6 | ensure!(false == false == true);
|
||||
| ^^ ^^
|
||||
|
|
||||
help: split the comparison into two
|
||||
|
|
||||
6 | ensure!(false == false && false == true);
|
||||
| ++++++++
|
||||
6
vendor/anyhow/tests/ui/empty-ensure.rs
vendored
Normal file
6
vendor/anyhow/tests/ui/empty-ensure.rs
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
use anyhow::{ensure, Result};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
ensure!();
|
||||
Ok(())
|
||||
}
|
||||
12
vendor/anyhow/tests/ui/empty-ensure.stderr
vendored
Normal file
12
vendor/anyhow/tests/ui/empty-ensure.stderr
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
error: unexpected end of macro invocation
|
||||
--> tests/ui/empty-ensure.rs:4:5
|
||||
|
|
||||
4 | ensure!();
|
||||
| ^^^^^^^^^ missing tokens in macro arguments
|
||||
|
|
||||
note: while trying to match meta-variable `$cond:expr`
|
||||
--> src/ensure.rs
|
||||
|
|
||||
| ($cond:expr $(,)?) => {
|
||||
| ^^^^^^^^^^
|
||||
= note: this error originates in the macro `$crate::__parse_ensure` which comes from the expansion of the macro `ensure` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
11
vendor/anyhow/tests/ui/must-use.rs
vendored
Normal file
11
vendor/anyhow/tests/ui/must-use.rs
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#![deny(unused_must_use)]
|
||||
|
||||
use anyhow::anyhow;
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
if true {
|
||||
// meant to write bail!
|
||||
anyhow!("it failed");
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
12
vendor/anyhow/tests/ui/must-use.stderr
vendored
Normal file
12
vendor/anyhow/tests/ui/must-use.stderr
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
error: unused return value of `anyhow::__private::must_use` that must be used
|
||||
--> tests/ui/must-use.rs:8:9
|
||||
|
|
||||
8 | anyhow!("it failed");
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> tests/ui/must-use.rs:1:9
|
||||
|
|
||||
1 | #![deny(unused_must_use)]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the macro `anyhow` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
8
vendor/anyhow/tests/ui/no-impl.rs
vendored
Normal file
8
vendor/anyhow/tests/ui/no-impl.rs
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
use anyhow::anyhow;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct Error;
|
||||
|
||||
fn main() {
|
||||
let _ = anyhow!(Error);
|
||||
}
|
||||
31
vendor/anyhow/tests/ui/no-impl.stderr
vendored
Normal file
31
vendor/anyhow/tests/ui/no-impl.stderr
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
error[E0599]: the method `anyhow_kind` exists for reference `&Error`, but its trait bounds were not satisfied
|
||||
--> tests/ui/no-impl.rs:7:13
|
||||
|
|
||||
4 | struct Error;
|
||||
| ------------
|
||||
| |
|
||||
| doesn't satisfy `Error: Into<anyhow::Error>`
|
||||
| doesn't satisfy `Error: anyhow::kind::TraitKind`
|
||||
| doesn't satisfy `Error: std::fmt::Display`
|
||||
...
|
||||
7 | let _ = anyhow!(Error);
|
||||
| ^^^^^^^^^^^^^^ method cannot be called on `&Error` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`Error: Into<anyhow::Error>`
|
||||
which is required by `Error: anyhow::kind::TraitKind`
|
||||
`Error: std::fmt::Display`
|
||||
which is required by `&Error: anyhow::kind::AdhocKind`
|
||||
`&Error: Into<anyhow::Error>`
|
||||
which is required by `&Error: anyhow::kind::TraitKind`
|
||||
note: the traits `Into` and `std::fmt::Display` must be implemented
|
||||
--> $RUST/core/src/fmt/mod.rs
|
||||
|
|
||||
| pub trait Display {
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
::: $RUST/core/src/convert/mod.rs
|
||||
|
|
||||
| pub trait Into<T>: Sized {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the macro `anyhow` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
5
vendor/anyhow/tests/ui/temporary-value.rs
vendored
Normal file
5
vendor/anyhow/tests/ui/temporary-value.rs
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use anyhow::anyhow;
|
||||
|
||||
fn main() {
|
||||
let _ = anyhow!(&String::new());
|
||||
}
|
||||
9
vendor/anyhow/tests/ui/temporary-value.stderr
vendored
Normal file
9
vendor/anyhow/tests/ui/temporary-value.stderr
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0716]: temporary value dropped while borrowed
|
||||
--> tests/ui/temporary-value.rs:4:22
|
||||
|
|
||||
4 | let _ = anyhow!(&String::new());
|
||||
| ---------^^^^^^^^^^^^^-
|
||||
| | |
|
||||
| | creates a temporary value which is freed while still in use
|
||||
| temporary value is freed at the end of this statement
|
||||
| argument requires that borrow lasts for `'static`
|
||||
5
vendor/anyhow/tests/ui/wrong-interpolation.rs
vendored
Normal file
5
vendor/anyhow/tests/ui/wrong-interpolation.rs
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use anyhow::{bail, Result};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
bail!("{} not found");
|
||||
}
|
||||
5
vendor/anyhow/tests/ui/wrong-interpolation.stderr
vendored
Normal file
5
vendor/anyhow/tests/ui/wrong-interpolation.stderr
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
error: 1 positional argument in format string, but no arguments were given
|
||||
--> tests/ui/wrong-interpolation.rs:4:12
|
||||
|
|
||||
4 | bail!("{} not found");
|
||||
| ^^
|
||||
Loading…
Add table
Add a link
Reference in a new issue