Bubble sort in Rust that correctly sorts a slice of generic type T using the Ord trait for comparison:

```rust
fn bubble_sort<T: Ord>(arr: &mut [T]) {
    let len = arr.len();
    for i in 0..len {
        for j in 0..len-i-1 {
            if arr[j] > arr[j+1] {
                arr.swap(j, j+1);
            }
        }
    }
}
```
The function works by iterating through the slice with an outer loop, and then for each iteration of the outer loop, iterating through the remaining unsorted elements of the slice with an inner loop. In the inner loop, we compare adjacent elements of the slice and swap them if they are out of order. This causes the largest unsorted element to "bubble" to the end of the slice. The inner loop stops one element short of the end of the slice on each iteration of the outer loop, since the last element is guaranteed to be sorted by that point.

The type parameter T is constrained by the Ord trait, which means that the elements in the slice must be comparable using the < and > operators.

Here's an example usage of the function:

```rust
fn main() {
    let mut arr = vec![5, 3, 1, 4, 2];
    bubble_sort(&mut arr);
    println!("{:?}", arr);
}
```
This will output `[1, 2, 3, 4, 5]`.
spam lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor creativity violence