David Tolnay

Results 361 issues of David Tolnay

```rust // src/lib.rs pub struct Thing; ``` ```rust // tests/compiletest.rs #[test] fn ui() { let t = trybuild::TestCases::new(); t.pass("tests/ui/test.rs"); } ``` ```rust // tests/ui/test.rs use repro::Thing; fn main() {} ```...

Requires opt-in for now (`cargo test --features trybuild/diff`). Currently unix-only. We will need to look into how to get highlighted background color reliably on Windows terminals, and ideally implement support...

```rust #[typetag::serde(tag = "type", rename_all = "snake_case")] trait WebEvent {...} // ^^^^^^^^^^^^^^^^^^^^^^^^^ #[typetag::serde] impl WebEvent for PageLoad {...} #[typetag::serde] impl WebEvent for Click {...} ``` These should serialize with `"type":...

For this sort of code today \[\]: ```rust #[error("{code}{}", match .message { Some(msg) => format!(" - {}", &msg), None => "".to_owned(), })] SungrowError { code: u16, message: Option }, ```...

Panics seem to get printed decently by the interpreted runtime, but not the JIT runtime. To reproduce, cherry-pick 149ca1a421e461ecb1f88cb1b37fcceb9dd6b653 and then: ```console $ cargo build --release --target wasm32-unknown-unknown --manifest-path demo/impl/Cargo.toml...

help wanted

In the non-JIT runtime let's time how long each macro call takes and print a message if any one takes too long, pointing to the JIT installation instructions and explaining...

help wanted

From some rough tests, Watt macro expansion when compiling the runtime in release mode is about 15x faster than when the runtime is compiled in debug mode. Maybe we can...

help wanted

We'll want to take some representative proc macro(s) to compile to wasm, and set up a benchmark that times how long it takes to expand some representative inputs. This would...

help wanted

In brief: `tt_call!` is where `$caller` comes from. If you already have a `$caller` to return to, you can write an ordinary macro invocation like usual. If you are the...

We may be using serde_stacker to prevent stack overflows but still want to cap the recursion at 1000 levels or something. Alternatively, recursion limit could be provided by a separate...