| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| | |
|
| | |
|
| |
|
|
|
| |
This allows call sites which have a `Bug` to add additional context,
beyond just the stack trace.
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
```text
2024-10-29T01:57:31Z ERROR arti: error: internal error (bug) at crates/arti/src/lib.rs:378:27: foo
Backtrace [{ fn: "tor_error::internal::ie_backtrace::capture", file: "./crates/tor-error/src/internal.rs", line: 21 }, { fn: "tor_error::internal::Bug::new_inner", file: "./crates/tor-error/src/internal.rs", line: 105 }, { fn: "tor_error::internal::Bug::new", file: "./crates/tor-error/src/internal.rs", line: 94 }, { fn: "arti::main_main", file: "./crates/arti/src/lib.rs", line: 378 }, ...
```
After:
```text
2024-10-29T01:58:23Z ERROR arti: error: internal error (bug) at crates/arti/src/lib.rs:378:27: foo
0: tor_error::internal::ie_backtrace::capture
at ./crates/tor-error/src/internal.rs:21:27
1: tor_error::internal::Bug::new_inner
at ./crates/tor-error/src/internal.rs:105:24
2: tor_error::internal::Bug::new
at ./crates/tor-error/src/internal.rs:94:9
3: arti::main_main
at ./crates/arti/src/lib.rs:378:27
...
```
|
| | |
|
| |
|
|
|
| |
Removes resolve_backtraces from rtmock since it is no longer needed as
stdlib's backtraces automatically lazily resolve without needing a &mut.
|
| | |
|
| |
|
|
|
| |
Prompted by clippy complaining that the content wasn't ever read other
than by the autogenerated Debug impl.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This launders the closure so that clippy's
clippy::redundant_closure_call can't see it.
We can't have a local #[allow] because it would be on an expression,
which isn't allowed on stable.
This avoids having to use more clumsy idioms at call sites.
|
| | |
|
| | |
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| | |
|
| |
|
|
|
|
|
| |
This lint exists for perf reasons, and this is rarely relevant in
tests.
Using double quoted str is generally cognitively less burdensome.
|
| |
|
|
| |
Spotted this in passing.
|
| |
|
|
| |
it may fix this test when running in release, where the function gets inlined, so its name does not appear in the backtrace
|
| |
|
|
|
| |
This won't fix anything, but it will let us see what the backtrace
looks like when it fails.
|
| |
|
|
| |
I found the previous layout *much* better. Ah well.
|
| |
|
|
|
|
| |
"Fixes" #455 by suppressing the test.
This is !509 redux.
|
| |
|
| |
This reverts merge request !509
|
| |
|
|
| |
"Fixes" #455 by suppressing the test.
|
| |
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/310#note_2777626
The message from the kind is precisely right.
|
| |
|
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/310#note_2777519
mutatis mutandi.
And, fix a leftover instance with an old idea of what this was called.
|
| |
|
|
| |
Including supporting machinery, new kind field, etc.
|
| |
|
|
|
|
| |
These tests turned up a need for using the #[track_caller]
annotation in order to get accurate locations, which is fortunately
stable since Rust 1.46.0.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This can be used in call sites where an error is thought not to be
possible.
The `source` will be used only for formatting messages.
|
|
|
This can contain a backtrace, which will be printed.
|