Repository navigation
Commit 0444574
authored
Rollup merge of #165417 - xbwwj:doc-format-width-panic, r=ChrisDenton
Mention width limit panic in fmt doc
`format!` will panic if dynamic width exceeds 65535. Mention this in the doc.
```rust
fn main() {
println!("Hello {:width$}!", "x", width = 65536);
}
// thread 'main' (2688852) panicked at src/main.rs:2:5:
// Formatting argument out of range
// note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
0 commit comments