Skip to content

Commit

Permalink
Remove incorrect "default there is no limit" documentation from trivi…
Browse files Browse the repository at this point in the history
…al_copy_size_limit (rust-lang#13719)

Remove the documentation incorrectly saying there is no default,
followed by the default.

![image](https://github.com/user-attachments/assets/eab54c81-945d-4ce2-b9fb-5cc84f01e68c)

changelog: [`trivially_copy_pass_by_ref`]: Removed incorrect
documentation suggesting the default has no limit.
  • Loading branch information
xFrednet authored Nov 25, 2024
2 parents 479e1fc + 671183a commit d070402
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion book/src/lint_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ The order of associated items in traits.

## `trivial-copy-size-limit`
The maximum size (in bytes) to consider a `Copy` type for passing by value instead of by
reference. By default there is no limit
reference.

**Default Value:** `target_pointer_width * 2`

Expand Down
2 changes: 1 addition & 1 deletion clippy_config/src/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ define_Conf! {
#[lints(arbitrary_source_item_ordering)]
trait_assoc_item_kinds_order: SourceItemOrderingTraitAssocItemKinds = DEFAULT_TRAIT_ASSOC_ITEM_KINDS_ORDER.into(),
/// The maximum size (in bytes) to consider a `Copy` type for passing by value instead of by
/// reference. By default there is no limit
/// reference.
#[default_text = "target_pointer_width * 2"]
#[lints(trivially_copy_pass_by_ref)]
trivial_copy_size_limit: Option<u64> = None,
Expand Down

0 comments on commit d070402

Please sign in to comment.