Skip to content

Commit

Permalink
Merge pull request #621 from nasso/patch-1
Browse files Browse the repository at this point in the history
Remove extra parenthesis
  • Loading branch information
ehuss committed Jul 8, 2019
2 parents 77ea043 + 964b901 commit c0c912d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/attributes/limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,19 @@ to set the limit based on the number of type substitutions.

> Note: The default in `rustc` is 1048576.
```rust,compile_fail
<!-- This code should fail to compile. Unfortunately rustdoc's `compile_fail`
stops after analysis phase, and this error is generated after that. So
this needs to be `ignore` for now. -->

```rust,compile_fail,ignore
#![type_length_limit = "8"]
fn f<T>(x: T) {}
// This fails to compile because monomorphizing to
// `f::<(i32, i32, i32, i32, i32, i32, i32, i32, i32)>>` requires more
// than 8 type elements.
f(((1, 2, 3, 4, 5, 6, 7, 8, 9));
f((1, 2, 3, 4, 5, 6, 7, 8, 9));
```

[_MetaNameValueStr_]: attributes.html#meta-item-attribute-syntax
Expand Down

0 comments on commit c0c912d

Please sign in to comment.